xilinx

Xilinx之RAM使用指南

旧街凉风 提交于 2020-01-12 05:36:39
一、 RAM 分类 XILINX 的 RAM 可分为三种,分别是:单口 RAM,简化双口 RAM 和真双口 RAM。如下 图所示: 图1 单口 RAM 图2 简化双口 RAM A 口写入数据,B 口读数据 图3 真双口 RAM A,B 任意一个口都可以读写数据,可从 A 写入,B 读数据 二、选择数据位宽和深度 Block RAM 的数据位宽为 1-1152bit,深度取决于所选择 FPGA 器件中 block 的数量。超出地址范围之外的写操作,写进去的数据不会与存储器件中的数据冲突。 读超出地址范围之 外数据将会返回无效数据。注意, 当对超出范围的地址进行操作的时候, 不能置位 set 或 reset信号,因为这仍然会读出无效数据。 三、操作模式 每个端口的操作模式决定了此端口的读和写之间关系。端口 A 和 B 可以独立配置为以 下三种模式中任一模式:写优先模式,读优先模式,不改变模式。这些模式详解见下面。当 A 和 B 端口地址有冲突时,操作模式就会影响 A 和 B 口之间关系。 1.写优先模式(write first mode): 在写优先模式中,输入数据被自动写入存储器件中,并且出现在数据输出端口。时序见下图。这种传输模式增强了在同一端口写操作时使用数据输出总线的灵活性。(即输入数据的同时自动写进存储器和驱动数据到数据输出端) 图4 写优先操作模式 2.读优先模式(read

Why do we use REG in FGPA / VHDL / VIVADO?

梦想与她 提交于 2020-01-07 05:39:08
问题 I am programming with Xilinx's vivado in verilog. I was wondering why for some outputs we use reg For example reg [3:0] encoder_output we use that because our 16 to 4 encoder has 4 outputs right? I am assuming that we use reg whenever we need to "STORE SOMETHING" Is my idea right?? 回答1: It's not actually a stupid question, despite all the downvotes. In The Beginning, The Designer created nets and registers. Nets were intended as connections between hardware elements, and had values driven

generic adder “inference architecture”: simulation error

情到浓时终转凉″ 提交于 2020-01-07 01:21:11
问题 So, I have to create a generic N-bit adder with carry in and carry out. I have made two fully working architectures so far, one using the generate function and one using the rtl description as follows: entity: library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity adder_n is generic (N: integer:=8); port ( a,b: in std_logic_vector(0 to N-1); cin: in std_logic; s: out std_logic_vector(0 to N-1); cout: out std_logic); end adder_n; architectures 1 and 2: --STRUCT

Bad s_axi_bvalid, s_axi_wready, and s_axi_awready signals using Vivado IIC IP Flow

早过忘川 提交于 2020-01-06 19:40:36
问题 Im attempting to program an IIC Master Receiver with a Repeated Start. After writing the device address to the TX_FIFO s_axi_bvalid, s_axi_wready, and s_axi_awready are 'X'. I'm not sure whats happening. I've attached my timing diagram. Thanks for your help. DESIGN UNDER TEST module i2c_channel #( parameter CHANNEL_OUTPUT_WIDTH = 16 )( input clk, input reset, //the address of the slave; input [6:0] slave_address, //The width of the message expected from the slave at the specified address;

Bad s_axi_bvalid, s_axi_wready, and s_axi_awready signals using Vivado IIC IP Flow

拥有回忆 提交于 2020-01-06 19:39:32
问题 Im attempting to program an IIC Master Receiver with a Repeated Start. After writing the device address to the TX_FIFO s_axi_bvalid, s_axi_wready, and s_axi_awready are 'X'. I'm not sure whats happening. I've attached my timing diagram. Thanks for your help. DESIGN UNDER TEST module i2c_channel #( parameter CHANNEL_OUTPUT_WIDTH = 16 )( input clk, input reset, //the address of the slave; input [6:0] slave_address, //The width of the message expected from the slave at the specified address;

using values instead of pointers as function arguments

我们两清 提交于 2020-01-04 04:07:06
问题 I have this function "cost_compare" that I would like to offload on FPGA for some experimental purposes. This function, how it is called and its arguments are as follows. The synthesis tool doesn't accept double pointers as arguments for HW functions (in fact it is very picky about using pointers especially to data structures). How do I get rid of the pointers in the function argument list? In other words, how do I convert pointers in this example to values? How does this possible solution

Why does an If statement cause a latch in verilog?

北慕城南 提交于 2020-01-04 02:06:26
问题 I am trying to code a controller/data-path implementation in Verilog, and I am confused on what will cause an unwanted latch. Essentially, I have a state machine updating on the negedge clock. This state machine sends 5 control signals (loadSquare, loadDelta, addDelta, etc.) to the data-path based on what state the machine is in. The code for the data-path and controller is shown below. Data-path //Control lines reg addSquare, addDelta, decDelta; reg loadSquare, loadDelta; //Input lines reg

Weird XNOR behaviour in VHDL

六眼飞鱼酱① 提交于 2020-01-03 11:01:32
问题 The code that is causing problems looks like a normal xnor operation as you can see below: S(1) <= L(16) xnor L(26); This line causes the following error: ncvhdl_p: *E,EXPSMI (HDL/aes_sbox_enc_depth16.vhd,169|14): expecting a semicolon (';') [9.5.1]. ncvhdl_p: *F,MAXERR: maximum error count reached (1). TOOL: ncvhdl 10.20-s075: Exiting on Feb 14, 2012 at 12:56:05 GMT (total: 00:00:01) Anyone an idea what is going wrong here, the semicolon is clearly there. Is it possible that VHDL does not

mmap EINVAL error on UIO device

穿精又带淫゛_ 提交于 2020-01-03 04:24:26
问题 I have trouble mapping physical memory on Xilinx Zynq after attempting to use UIO instead of mapping directly /dev/mem . While the plan is to run the application as a normal user instead of root this is still being run as root . Apparently the first mapping is successful while the rest done to the same file descriptor 12 ( /dev/uio/ps2pl ) fail. While the obvious difference is the offset, it is within the range (see device tree) and it is properly page aligned. This application was working

Ideas for a flexible/generic decoder in VHDL

混江龙づ霸主 提交于 2020-01-02 02:48:06
问题 I want to create an address Decoder that is flexible enough for me to use when changing the number of bits of the selector and of the decoded output signals. So, instead of having a static (fixed input/output size) Decoder that looks something like this : entity Address_Decoder is Generic ( C_INPUT_SIZE: integer := 2 ); Port ( input : in STD_LOGIC_VECTOR (C_INPUT_SIZE-1 downto 0); output : out STD_LOGIC_VECTOR ((2**C_INPUT_SIZE)-1 downto 0); clk : in STD_LOGIC; rst : in STD_LOGIC ); end