關于FIFO Generator IP和XPM_FIFO在涉及位寬轉換上的區別

在Xilinx FPGA中,要實現FIFO的功能時,大部分時候會使用兩種方法:

  • FIFO Generator IP核
  • XPM_FIFO原語

FIFO Generator IP核的優點是有圖形化界面,配置參數非常直觀;缺點是參數一旦固定,想要更改的化就只能重新generate IP核。

XPM_FIFO原語的優點就是參數配置方便。

對于兩者,還有一個非常重要的區別。!!!大小端不一樣!!!

當din的位寬和dout的位寬非對稱時。舉個栗子:當din的位寬為8bit,dout的位寬為32bit時。

FIFO Generator IP核按大端輸出,即先寫進去的數據放在高8bit

XPM_FIFO原語按小端輸出,即先寫進去的數據放在低8bit

下面為RTL設計文件和測試結果。

//-----------------------------------------------------------------------------
//  
//  Copyright (c) JoeJoe.
//
//  Project  : fifo_test
//  Module   : fifo_test.v
//  Parent   : None
//  Children : None
//
//  Description: 
//     
//     
//     
//
//  Parameters:
//    
//    
//    
//
//  Local Parameters:
//
//  Notes       : 
//
//  Multicycle and False Paths
//    Some exist, embedded within the submodules. See the submodule
//    descriptions.
//`timescale 1ns/1psmodule fifo_test (input sclk,input srst_n
);//***************************************************************************
// Parameter definitions
//***************************************************************************//***************************************************************************
// Reg declarations
//***************************************************************************reg [2:0] wait_cnt;reg wr_en;reg [7:0] din;wire rd_en;wire prog_full;wire full;wire empty;wire [31:0] dout;reg xpm_wr_en;reg [7:0] xpm_din;wire xpm_rd_en;wire xpm_prog_full;wire xpm_full;wire xpm_empty;wire [31:0] xpm_dout;//***************************************************************************
// Wire declarations
//***************************************************************************//***************************************************************************
// Code
//***************************************************************************// 等待XPM FIFO not busyalways @(posedge sclk) beginif (srst_n == 1'b0) beginwait_cnt <= 'd0;endelse beginif (wait_cnt == 'd7) beginwait_cnt <= wait_cnt;endelse beginwait_cnt <= wait_cnt + 'd1;endendend// 非滿就寫always @(posedge sclk) beginif (srst_n == 1'b0) beginwr_en <= 1'b0;din <= 'd0;endelse beginif (prog_full == 1'b1) beginwr_en <= 1'b0;din <= 'd0;endelse if (wait_cnt == 'd7) beginwr_en <= 1'b1;din <= din + 'd1;endelse beginwr_en <= 1'b0;din <= 'd0;endendend// 非空就讀assign rd_en = ~empty;// 非滿就寫always @(posedge sclk) beginif (srst_n == 1'b0) beginxpm_wr_en <= 1'b0;xpm_din <= 'd0;endelse beginif (xpm_prog_full == 1'b1) beginxpm_wr_en <= 1'b0;xpm_din <= 'd0;endelse if (wait_cnt == 'd7) beginxpm_wr_en <= 1'b1;xpm_din <= din + 'd1;endelse beginxpm_wr_en <= 1'b0;xpm_din <= 'd0;endendend// 非空就讀assign xpm_rd_en = ~xpm_empty;fifo_generator_0 U_FIFO_GENERATOR_0 (.clk              ( sclk           ) // input wire clk,.srst             ( ~srst_n        ) // input wire srst,.din              ( din            ) // input wire [7 : 0] din,.wr_en            ( wr_en          ) // input wire wr_en,.rd_en            ( rd_en          ) // input wire rd_en,.dout             ( dout           ) // output wire [31 : 0] dout,.full             ( full           ) // output wire full,.empty            ( empty          ) // output wire empty,.prog_full        ( prog_full      ) // output wire prog_full);xpm_fifo_sync #(.DOUT_RESET_VALUE   ( "0"      ), // String.ECC_MODE           ( "no_ecc" ), // String.FIFO_MEMORY_TYPE   ( "block"  ), // String.FIFO_READ_LATENCY  ( 0        ), // DECIMAL.FIFO_WRITE_DEPTH   ( 1024     ), // DECIMAL.FULL_RESET_VALUE   ( 0        ), // DECIMAL.PROG_EMPTY_THRESH  ( 10       ), // DECIMAL.PROG_FULL_THRESH   ( 500      ), // DECIMAL.RD_DATA_COUNT_WIDTH( 1        ), // DECIMAL.READ_DATA_WIDTH    ( 32       ), // DECIMAL.READ_MODE          ( "fwft"   ), // String.SIM_ASSERT_CHK     ( 0        ), // DECIMAL; 0=disable simulation messages, 1=enable simulation messages.USE_ADV_FEATURES   ( "0707"   ), // String.WAKEUP_TIME        ( 0        ), // DECIMAL.WRITE_DATA_WIDTH   ( 8        ), // DECIMAL.WR_DATA_COUNT_WIDTH( 1        )  // DECIMAL)U_XPM_FIFO_SYNC (.almost_empty   (             ), // 1-bit output: Almost Empty : When asserted, this signal indicates that// only one more read can be performed before the FIFO goes to empty..almost_full    (             ), // 1-bit output: Almost Full: When asserted, this signal indicates that// only one more write can be performed before the FIFO is full..data_valid     (             ), // 1-bit output: Read Data Valid: When asserted, this signal indicates// that valid data is available on the output bus (dout         )..dbiterr        (             ), // 1-bit output: Double Bit Error: Indicates that the ECC decoder detected// a double-bit error and data in the FIFO core is corrupted..dout           (xpm_dout     ), // READ_DATA_WIDTH-bit output: Read Data: The output data bus is driven// when reading the FIFO..empty          (xpm_empty    ), // 1-bit output: Empty Flag: When asserted, this signal indicates that the// FIFO is empty. Read requests are ignored when the FIFO is empty,// initiating a read while empty is not destructive to the FIFO..full           (xpm_full     ), // 1-bit output: Full Flag: When asserted, this signal indicates that the// FIFO is full. Write requests are ignored when the FIFO is full,// initiating a write when the FIFO is full is not destructive to the// contents of the FIFO..overflow       (             ), // 1-bit output: Overflow: This signal indicates that a write request// (wren) during the prior clock cycle was rejected, because the FIFO is// full. Overflowing the FIFO is not destructive to the contents of the// FIFO..prog_empty     (             ), // 1-bit output: Programmable Empty: This signal is asserted when the// number of words in the FIFO is less than or equal to the programmable// empty threshold value. It is de-asserted when the number of words in// the FIFO exceeds the programmable empty threshold value..prog_full      (xpm_prog_full), // 1-bit output: Programmable Full: This signal is asserted when the// number of words in the FIFO is greater than or equal to the// programmable full threshold value. It is de-asserted when the number of// words in the FIFO is less than the programmable full threshold value..rd_data_count  (             ), // RD_DATA_COUNT_WIDTH-bit output: Read Data Count: This bus indicates the// number of words read from the FIFO..rd_rst_busy    (             ), // 1-bit output: Read Reset Busy: Active-High indicator that the FIFO read// domain is currently in a reset state..sbiterr        (             ), // 1-bit output: Single Bit Error: Indicates that the ECC decoder detected// and fixed a single-bit error..underflow      (             ), // 1-bit output: Underflow: Indicates that the read request (rd_en) during// the previous clock cycle was rejected because the FIFO is empty. Under// flowing the FIFO is not destructive to the FIFO..wr_ack         (             ), // 1-bit output: Write Acknowledge: This signal indicates that a write// request(wr_en) during the prior clock cycle is succeeded..wr_data_count  (             ), // WR_DATA_COUNT_WIDTH-bit output: Write Data Count: This bus indicates// the number of words written into the FIFO..wr_rst_busy    (             ), // 1-bit output: Write Reset Busy: Active-High indicator that the FIFO// write domain is currently in a reset state..din            (xpm_din      ), // WRITE_DATA_WIDTH-bit input: Write Data: The input data bus used when// writing the FIFO..injectdbiterr  (1'b0         ), // 1-bit input: Double Bit Error Injection: Injects a double bit error if// the ECC feature is used on block RAMs or UltraRAM macros..injectsbiterr  (1'b0         ), // 1-bit input: Single Bit Error Injection: Injects a single bit error if// the ECC feature is used on block RAMs or UltraRAM macros..rd_en          (xpm_rd_en    ), // 1-bit input: Read Enable: If the FIFO is not empty, asserting this// signal causes data(on dout) to be read from the FIFO. Must be held// active-low when rd_rst_busy is active high..rst            (~srst_n      ), // 1-bit input: Reset: Must be synchronous to wr_clk. The clock(s) can be// unstable at the time of applying reset, but reset must be released only// after the clock(s) is/are stable..sleep          (1'b0         ), // 1-bit input: Dynamic power saving- If sleep is High, the memory/fifo// block is in power saving mode..wr_clk         (sclk         ), // 1-bit input: Write clock: Used for write operation. wr_clk must be a// free running clock..wr_en          (xpm_wr_en    )  // 1-bit input: Write Enable: If the FIFO is not full, asserting this// signal causes data(on din) to be written to the FIFO Must be held// active-low when rst or wr_rst_busy or rd_rst_busy is active high);      endmodule

32bit寫,8bit讀
當din的位寬和dout的位寬非對稱時。舉個栗子:當din的位寬為32bit,dout的位寬為8bit時。

FIFO Generator IP核 高8bit先輸出,低8bit最后輸出

XPM_FIFO原語 低8bit先輸出,高8bit最后輸出

下面為RTL設計文件和測試結果。

//-----------------------------------------------------------------------------
//  
//  Copyright (c) JoeJoe.
//
//  Project  : fifo_test
//  Module   : fifo_test.v
//  Parent   : None
//  Children : None
//
//  Description: 
//     
//     
//     
//
//  Parameters:
//    
//    
//    
//
//  Local Parameters:
//
//  Notes       : 
//
//  Multicycle and False Paths
//    Some exist, embedded within the submodules. See the submodule
//    descriptions.
//`timescale 1ns/1psmodule fifo_test (input sclk,input srst_n
);//***************************************************************************
// Parameter definitions
//***************************************************************************//***************************************************************************
// Reg declarations
//***************************************************************************reg [2:0] wait_cnt;reg wr_en;reg [31:0] din;wire rd_en;wire prog_full;wire full;wire empty;wire [7:0] dout;reg xpm_wr_en;reg [31:0] xpm_din;wire xpm_rd_en;wire xpm_prog_full;wire xpm_full;wire xpm_empty;wire [7:0] xpm_dout;//***************************************************************************
// Wire declarations
//***************************************************************************//***************************************************************************
// Code
//***************************************************************************// 等待XPM FIFO not busyalways @(posedge sclk) beginif (srst_n == 1'b0) beginwait_cnt <= 'd0;endelse beginif (wait_cnt == 'd7) beginwait_cnt <= wait_cnt;endelse beginwait_cnt <= wait_cnt + 'd1;endendend// 非滿就寫always @(posedge sclk) beginif (srst_n == 1'b0) beginwr_en <= 1'b0;din <= 'd0;endelse beginif (prog_full == 1'b1) beginwr_en <= 1'b0;din <= din;endelse if (wait_cnt == 'd7) beginwr_en <= 1'b1;din <= din + 'd1;endelse beginwr_en <= 1'b0;din <= 'd0;endendend// 非空就讀assign rd_en = ~empty;// 非滿就寫always @(posedge sclk) beginif (srst_n == 1'b0) beginxpm_wr_en <= 1'b0;xpm_din <= 'd0;endelse beginif (xpm_prog_full == 1'b1) beginxpm_wr_en <= 1'b0;xpm_din <= xpm_din;endelse if (wait_cnt == 'd7) beginxpm_wr_en <= 1'b1;xpm_din <= xpm_din + 'd1;endelse beginxpm_wr_en <= 1'b0;xpm_din <= 'd0;endendend// 非空就讀assign xpm_rd_en = ~xpm_empty;// fifo_generator_0 U_FIFO_GENERATOR_0 (//      .clk              ( sclk           ) // input wire clk//     ,.srst             ( ~srst_n        ) // input wire srst//     ,.din              ( din            ) // input wire [7 : 0] din//     ,.wr_en            ( wr_en          ) // input wire wr_en//     ,.rd_en            ( rd_en          ) // input wire rd_en//     ,.dout             ( dout           ) // output wire [31 : 0] dout//     ,.full             ( full           ) // output wire full//     ,.empty            ( empty          ) // output wire empty//     ,.prog_full        ( prog_full      ) // output wire prog_full// );fifo_generator_1 U_FIFO_GENERATOR_1 (.clk              ( sclk           ) // input wire clk,.srst             ( ~srst_n        ) // input wire srst,.din              ( din            ) // input wire [31 : 0] din,.wr_en            ( wr_en          ) // input wire wr_en,.rd_en            ( rd_en          ) // input wire rd_en,.dout             ( dout           ) // output wire [7 : 0] dout,.full             ( full           ) // output wire full,.empty            ( empty          ) // output wire empty,.prog_full        ( prog_full      ) // output wire prog_full);xpm_fifo_sync #(.DOUT_RESET_VALUE   ( "0"      ), // String.ECC_MODE           ( "no_ecc" ), // String.FIFO_MEMORY_TYPE   ( "block"  ), // String.FIFO_READ_LATENCY  ( 0        ), // DECIMAL.FIFO_WRITE_DEPTH   ( 256      ), // DECIMAL.FULL_RESET_VALUE   ( 0        ), // DECIMAL.PROG_EMPTY_THRESH  ( 10       ), // DECIMAL.PROG_FULL_THRESH   ( 125      ), // DECIMAL.RD_DATA_COUNT_WIDTH( 1        ), // DECIMAL.READ_DATA_WIDTH    ( 8        ), // DECIMAL.READ_MODE          ( "fwft"   ), // String.SIM_ASSERT_CHK     ( 0        ), // DECIMAL; 0=disable simulation messages, 1=enable simulation messages.USE_ADV_FEATURES   ( "0707"   ), // String.WAKEUP_TIME        ( 0        ), // DECIMAL.WRITE_DATA_WIDTH   ( 32       ), // DECIMAL.WR_DATA_COUNT_WIDTH( 1        )  // DECIMAL)U_XPM_FIFO_SYNC (.almost_empty   (             ), // 1-bit output: Almost Empty : When asserted, this signal indicates that// only one more read can be performed before the FIFO goes to empty..almost_full    (             ), // 1-bit output: Almost Full: When asserted, this signal indicates that// only one more write can be performed before the FIFO is full..data_valid     (             ), // 1-bit output: Read Data Valid: When asserted, this signal indicates// that valid data is available on the output bus (dout         )..dbiterr        (             ), // 1-bit output: Double Bit Error: Indicates that the ECC decoder detected// a double-bit error and data in the FIFO core is corrupted..dout           (xpm_dout     ), // READ_DATA_WIDTH-bit output: Read Data: The output data bus is driven// when reading the FIFO..empty          (xpm_empty    ), // 1-bit output: Empty Flag: When asserted, this signal indicates that the// FIFO is empty. Read requests are ignored when the FIFO is empty,// initiating a read while empty is not destructive to the FIFO..full           (xpm_full     ), // 1-bit output: Full Flag: When asserted, this signal indicates that the// FIFO is full. Write requests are ignored when the FIFO is full,// initiating a write when the FIFO is full is not destructive to the// contents of the FIFO..overflow       (             ), // 1-bit output: Overflow: This signal indicates that a write request// (wren) during the prior clock cycle was rejected, because the FIFO is// full. Overflowing the FIFO is not destructive to the contents of the// FIFO..prog_empty     (             ), // 1-bit output: Programmable Empty: This signal is asserted when the// number of words in the FIFO is less than or equal to the programmable// empty threshold value. It is de-asserted when the number of words in// the FIFO exceeds the programmable empty threshold value..prog_full      (xpm_prog_full), // 1-bit output: Programmable Full: This signal is asserted when the// number of words in the FIFO is greater than or equal to the// programmable full threshold value. It is de-asserted when the number of// words in the FIFO is less than the programmable full threshold value..rd_data_count  (             ), // RD_DATA_COUNT_WIDTH-bit output: Read Data Count: This bus indicates the// number of words read from the FIFO..rd_rst_busy    (             ), // 1-bit output: Read Reset Busy: Active-High indicator that the FIFO read// domain is currently in a reset state..sbiterr        (             ), // 1-bit output: Single Bit Error: Indicates that the ECC decoder detected// and fixed a single-bit error..underflow      (             ), // 1-bit output: Underflow: Indicates that the read request (rd_en) during// the previous clock cycle was rejected because the FIFO is empty. Under// flowing the FIFO is not destructive to the FIFO..wr_ack         (             ), // 1-bit output: Write Acknowledge: This signal indicates that a write// request(wr_en) during the prior clock cycle is succeeded..wr_data_count  (             ), // WR_DATA_COUNT_WIDTH-bit output: Write Data Count: This bus indicates// the number of words written into the FIFO..wr_rst_busy    (             ), // 1-bit output: Write Reset Busy: Active-High indicator that the FIFO// write domain is currently in a reset state..din            (xpm_din      ), // WRITE_DATA_WIDTH-bit input: Write Data: The input data bus used when// writing the FIFO..injectdbiterr  (1'b0         ), // 1-bit input: Double Bit Error Injection: Injects a double bit error if// the ECC feature is used on block RAMs or UltraRAM macros..injectsbiterr  (1'b0         ), // 1-bit input: Single Bit Error Injection: Injects a single bit error if// the ECC feature is used on block RAMs or UltraRAM macros..rd_en          (xpm_rd_en    ), // 1-bit input: Read Enable: If the FIFO is not empty, asserting this// signal causes data(on dout) to be read from the FIFO. Must be held// active-low when rd_rst_busy is active high..rst            (~srst_n      ), // 1-bit input: Reset: Must be synchronous to wr_clk. The clock(s) can be// unstable at the time of applying reset, but reset must be released only// after the clock(s) is/are stable..sleep          (1'b0         ), // 1-bit input: Dynamic power saving- If sleep is High, the memory/fifo// block is in power saving mode..wr_clk         (sclk         ), // 1-bit input: Write clock: Used for write operation. wr_clk must be a// free running clock..wr_en          (xpm_wr_en    )  // 1-bit input: Write Enable: If the FIFO is not full, asserting this// signal causes data(on din) to be written to the FIFO Must be held// active-low when rst or wr_rst_busy or rd_rst_busy is active high);      endmodule

8bit寫,32bit讀
參考文檔如下:《FIFO Generator v13.2 Product Guide》(PG057)
FIFO Generator IP
支持的非對稱比

FIFO Generator IP,小位寬寫,大位寬讀,大端。
大轉小
大轉小時序圖
FIFO Generator IP,大位寬寫,小位寬讀。
小轉大
小轉大時序圖
疑問:XPM_FIFO為什么不可以設置大小端,以及為什么不和FIFO Generator IP統一???

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/diannao/13190.shtml
繁體地址,請注明出處:http://hk.pswp.cn/diannao/13190.shtml
英文地址,請注明出處:http://en.pswp.cn/diannao/13190.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

一次tomcat閃退處理

雙擊tomcat目錄下bin目錄中startup.bat 在我的電腦上是一閃而過&#xff0c;不能正常地啟動tomcat軟件 以記事本打開startup.bat文件&#xff0c;在文件的結尾處加上pause 然后再雙擊該bat執行&#xff0c;此時窗口就不會關閉&#xff0c;并會將錯誤信息打印在提示框中 可能是…

英偉達發布 VILA 視覺語言模型,實現多圖像推理、增強型上下文學習,性能超越 LLaVA-1.5

前言 近年來&#xff0c;大型語言模型 (LLM) 的發展取得了顯著的成果&#xff0c;并逐漸應用于多模態領域&#xff0c;例如視覺語言模型 (VLM)。VLM 旨在將 LLM 的強大能力擴展到視覺領域&#xff0c;使其能夠理解和處理圖像和文本信息&#xff0c;并完成諸如視覺問答、圖像描…

一看就會的AOP事務

文章目錄 AOPAOP簡介AOP簡介和作用AOP的應用場景為什么要學習AOP AOP入門案例思路分析代碼實現AOP中的核心概念 AOP工作流程AOP工作流程AOP核心概念在測試類中驗證代理對象 AOP切入點表達式語法格式通配符書寫技巧 AOP通知類型AOP通知分類AOP通知詳解 AOP案例案例-測量業務層接…

Linux bc命令(bc指令)(基本計算器)(任意精度計算語言:支持浮點數運算、變量賦值和自定義函數等)

文章目錄 bc命令文檔英文中文 Linux bc 命令詳解bc 命令的基本用法啟動 bc 環境進行基本計算退出 bc bc 中的數學功能執行高級數學計算平方根和指數函數對數函數 處理精度問題 變量和數組變量賦值和使用數組的使用 創建和使用自定義函數 bc 命令的高級用法在腳本中使用 bc基本腳…

Google I/O 大會 | 精彩看點一覽

作者 / 開發者關系和開源總監 Timothy Jordan 2024 年 Google I/O 大會于北京時間 5 月 15 日 1:00am 在加利福尼亞的山景城以 Google 主題演講直播拉開序幕。隨后&#xff0c;在北京時間 4:30am 舉行開發者主題演講。大家可前往回看 "Google 主題演講" 以及 "開…

AIGC時代已至,你準備好抓住機遇了嗎?

一、行業前景 AIGC&#xff0c;即人工智能生成內容&#xff0c;是近年來人工智能領域中發展迅猛的一個分支。隨著大數據、云計算、機器學習等技術的不斷進步&#xff0c;AIGC已經取得了顯著的成果&#xff0c;并且在廣告、游戲、自媒體、教育、電商等多個領域實現了廣泛應用。…

AI寫算法:支持向量機(SVM)

在Python中&#xff0c;我們可以使用scikit-learn庫來實現支持向量機&#xff08;SVM&#xff09;。以下是一個簡單的示例&#xff0c;演示如何使用scikit-learn的SVC類來訓練一個SVM分類器&#xff0c;并使用它對一些數據進行預測。 python復制代碼 # 導入必要的庫 from skle…

圖像中的attention及QKV機制解釋

簡單記錄/推薦兩篇博客&#xff0c;后續細化寫一下&#xff1a; 圖像中的各類 attention https://blog.csdn.net/weixin_44505185/article/details/127013204 Cross-attention的直觀理解 首先理解&#xff0c;cross-attention 是兩個不同向量間的相關計算&#xff0c;一般Q…

DolphinScheduler(海豚調度)- docker部署實戰

1.官方文檔 https://dolphinscheduler.apache.org/zh-cn/docs/3.2.1/guide/start/docker 2.docker環境安裝 版本情況&#xff08;這個地方踩了不少坑&#xff09;&#xff1a;docker-26.1.2&#xff0c;docker-compose-v2.11.0。 具體可使用我上傳的安裝包&#xff0c;一鍵安…

leetcode題目55

跳躍游戲 中等 給你一個非負整數數組 nums &#xff0c;你最初位于數組的 第一個下標 。數組中的每個元素代表你在該位置可以跳躍的最大長度。 判斷你是否能夠到達最后一個下標&#xff0c;如果可以&#xff0c;返回 true &#xff1b;否則&#xff0c;返回 false 。 示例 1…

MT3037 新月軒就餐

思路&#xff1a; 此題每道菜的價錢相同&#xff0c;想最小化付的錢即求最小區間長度可以滿足“品嘗到所有名廚手藝”。 使用雙端隊列存儲元素&#xff0c;隊尾不斷向后遍歷&#xff1a;頭->尾 如果隊頭隊尾&#xff0c;則隊頭往右移一格&#xff0c;直到區間不同元素數m…

Docker部署MaxKB詳細步驟(window系統)

上面章節已經實現了ollama李現部署llama3&#xff0c;并實現了一些簡單的問答&#xff0c;但是問答的界面是在命令提示符中&#xff0c;交互很不友好&#xff0c;也不方便局域網其他用戶訪問&#xff0c;所以這節用docker部署MaxKB實現網頁訪問llama3&#xff0c;首先電腦上需要…

分布式系統的一致性與共識算法(四)

Etcd與Raft算法 Raft保證讀請求Linearizability的方法: 1.Leader把每次讀請求作為一條日志記錄&#xff0c;以日志復制的形式提交&#xff0c;并應用到狀態機后&#xff0c;讀取狀態機中的數據返回(一次RTT、一次磁盤寫)2.使用Leader Lease&#xff0c;保證整個集群只有一個L…

使用Flask-RESTful構建RESTful API

文章目錄 安裝Flask-RESTful導入模塊和類創建一個資源類運行應用測試API總結 Flask是一個輕量級的Python web開發框架&#xff0c;而Flask-RESTful是一個基于Flask的擴展&#xff0c;專門用于構建RESTful API。它提供了一些幫助類和方法&#xff0c;使構建API變得更加簡單和高效…

詳細分析Vue3中的reactive(附Demo)

目錄 1. 基本知識2. 用法3. Demo 1. 基本知識 reactive 是一個函數&#xff0c;用于將一個普通的 JavaScript 對象轉換為響應式對象 當對象的屬性發生變化時&#xff0c;Vue 會自動追蹤這些變化&#xff0c;并觸發相應的更新 Vue2沒有&#xff0c;而Vue3中有&#xff0c;為啥…

公司郵箱是什么?公司郵箱和個人郵箱有什么不同?

公司郵箱是企業用來收發郵件的專業版電子郵箱&#xff0c;不同于個人郵箱的簡單功能和有限的存儲空間&#xff0c;公司郵箱的功能更加豐富&#xff0c;能夠滿足企業的日常辦公和協作需求。本文將為您詳細講解公司郵箱和個人郵箱的區別&#xff0c;以供您選擇更適合自己的郵箱類…

嵌入式——C51版本Keil環境搭建

&#x1f3ac; 秋野醬&#xff1a;《個人主頁》 &#x1f525; 個人專欄:《Java專欄》《Python專欄》 ??心若有所向往,何懼道阻且長 文章目錄 目標搭建流程下載與安裝激活STC環境添加校驗是否導入STC環境 目標 ● 了解C51版本Keil開發環境的概念和用途 ● 掌握C51版本Keil環…

2024年NOC大賽創客智慧(西瓜創客)Python復賽編程真題模擬試卷包含答案

NOC復賽python模擬題 1.編寫一個程序&#xff0c;提示用戶輸人一個矩形的長度和寬度&#xff0c;并輸出其面積, 2.試計算在區間 1 到 n的所有整數中,數字x(0≤x≤9)共出現了多少次?例如在 1到11 中&#xff0c;即在 1,2,3.45,6.7,8.9,10,11 中&#xff0c;數字 1出現了 4 次.…

鴻蒙生態融合進行時!菊風啟動適配HarmonyOS NEXT,賦能原生應用實時

??今日話題 鴻蒙HarmonyOS NEXT 自華為公開宣布鴻蒙 HarmonyOS NEXT 系統以來&#xff0c;該系統受到了業內廣泛關注&#xff0c;和以往鴻蒙系統不同的是該系統底座完全由華為自研&#xff0c;摒棄了 Linux 內核和安卓 AOSP 代碼&#xff0c;僅兼容鴻蒙內核及鴻蒙系統的應用…

Leetcode---1.兩數之和 (詳解加哈希表解釋和使用)

文章目錄 題目 [兩數之和](https://leetcode.cn/problems/two-sum/)方法一&#xff1a;暴力枚舉代碼方法二&#xff1a;哈希表代碼 哈希表哈希表的基本概念哈希函數&#xff08;Hash Function&#xff09;&#xff1a;沖突&#xff08;Collision&#xff09;&#xff1a;鏈地址…