关于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.mzph.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;并且在广告、游戏、自媒体、教育、电商等多个领域实现了广泛应用。…

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;一键安…

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;链地址…

windows驱动开发-PCI讨论(一)

前面描述中断的时候&#xff0c;我们曾经多次体积PCI&#xff0c;甚至提供了一些PCI的相关知识&#xff0c;但是整个PCI是一个很大的体系&#xff0c;专门记录这个体系超出了这个系列的范畴&#xff0c;有兴趣的可以到PCI官网了解详细的情况。 但是还是会花费一些时间讨论PCI技…

Pytorch入门实战 P10-使用pytorch实现车牌识别

目录 前言 一、MyDataset文件 二、完整代码&#xff1a; 三、结果展示&#xff1a; 四、添加accuracy值 &#x1f368; 本文为&#x1f517;365天深度学习训练营 中的学习记录博客&#x1f356; 原作者&#xff1a;K同学啊 | 接辅导、项目定制 本周的学习内容是&#xff0…

国网698.45报文解析工具

本文分享一个698.45协议的报文解析工具&#xff0c;此报文解析工具功能强大&#xff0c;可以解析多种国网数据协议。 下载链接: https://pan.baidu.com/s/1ngbBG-yL8ucRWLDflqzEnQ 提取码: y1de 主要界面如下&#xff1a; 本工具内置698.45数据协议&#xff0c; 即可调用word…