R
RobertP
Guest
I'm trying to infer a 8x8 bit dual port distributed RAM in VirtexII
device, using XST.
My code looks similarly to the one from XST manual:
type RAM_TYPE is array(7 downto 0) of std_logic_vector(7 downto 0);
signal RAM : RAM_TYPE;
signal A: std_logic_vector(2 downto 0);
signal DPRA: std_logic_vector(2 downto 0);
..
..
..
RAM_INFER: process (clk)
begin
if (clk'event and clk = '1') then
if (RDBYTECNT_EN = '1') then
RAM(conv_integer(RDBYTE_CNT)) <= W1_DIN;
end if;
end if;
end process;
-- two 8-bit output ports are merged into 16-bit vector
RAM_OUT <= (RAM(conv_integer(DPRA))) & (RAM(conv_integer(A)));
Now I have two problems with above:
1) Every time (I think) modelsim executes function conv_integer()
it gives warnings like that:
There is an 'U'|'X'|'W'|'Z'|'-' in an arithmetic operand, the result
will be 'X'(es).
CONV_INTEGER: There is an 'U'|'X'|'W'|'Z'|'-' in an arithmetic
operand, and it has been converted to 0.
conv_integer() function comes from ieee.std_logic_unsigned pakcage.
I tried also using different packege, i.e. ieee.numeric_std, then it
looks like that:
RAM(to_integer(unsigned(A)))
and Modelsim outputs
NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
Am I doing something wrong? Aside from the warnings, simulation results
seem to be OK.
2)The synthesis report says:
Found 8x8-bit dual-port distributed RAM for signal <ram>.
-----------------------------------------------------------------------
| aspect ratio | 8-word x 8-bit |
| clock | connected to signal <clk> | rise
| write enable | connected to signal <rdbytecnt_en> | high
| address | connected to signal <rdbyte_cnt> |
| dual address | connected to signal <dpra> |
| data in | connected to signal <w1_din> |
| data out | not connected |
| dual data out | connected to internal node |
| ram_style | Distributed |
-----------------------------------------------------------------------
INFO:Xst:1442 - The RAM contents appears to be read asynchronousely. A
synchronous read would allow you to take advantage of available block
RAM resources, for optimized device usage and improved timings. Please
refer to your documentation for coding guidelines.
Found 8x8-bit dual-port distributed RAM for signal <ram>.
-----------------------------------------------------------------------
| aspect ratio | 8-word x 8-bit |
| clock | connected to signal <clk> | rise
| write enable | connected to signal <rdbytecnt_en> | high
| address | connected to signal <rdbyte_cnt> |
| dual address | connected to signal <a> |
| data in | connected to signal <w1_din> |
| data out | not connected |
| dual data out | connected to internal node |
| ram_style | Distributed |
-----------------------------------------------------------------------
INFO:Xst:1442 - The RAM contents appears to be read asynchronousely. A
synchronous read would allow you to take advantage of available block
RAM resources, for optimized device usage and improved timings. Please
refer to your documentation for coding guidelines.
Does it mean that synthesizer infered two RAMs instead of one? Is this OK?
I'm using ISE5.2 with service pack 3.
--
Robert Pudlik
device, using XST.
My code looks similarly to the one from XST manual:
type RAM_TYPE is array(7 downto 0) of std_logic_vector(7 downto 0);
signal RAM : RAM_TYPE;
signal A: std_logic_vector(2 downto 0);
signal DPRA: std_logic_vector(2 downto 0);
..
..
..
RAM_INFER: process (clk)
begin
if (clk'event and clk = '1') then
if (RDBYTECNT_EN = '1') then
RAM(conv_integer(RDBYTE_CNT)) <= W1_DIN;
end if;
end if;
end process;
-- two 8-bit output ports are merged into 16-bit vector
RAM_OUT <= (RAM(conv_integer(DPRA))) & (RAM(conv_integer(A)));
Now I have two problems with above:
1) Every time (I think) modelsim executes function conv_integer()
it gives warnings like that:
There is an 'U'|'X'|'W'|'Z'|'-' in an arithmetic operand, the result
will be 'X'(es).
CONV_INTEGER: There is an 'U'|'X'|'W'|'Z'|'-' in an arithmetic
operand, and it has been converted to 0.
conv_integer() function comes from ieee.std_logic_unsigned pakcage.
I tried also using different packege, i.e. ieee.numeric_std, then it
looks like that:
RAM(to_integer(unsigned(A)))
and Modelsim outputs
NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
Am I doing something wrong? Aside from the warnings, simulation results
seem to be OK.
2)The synthesis report says:
Found 8x8-bit dual-port distributed RAM for signal <ram>.
-----------------------------------------------------------------------
| aspect ratio | 8-word x 8-bit |
| clock | connected to signal <clk> | rise
| write enable | connected to signal <rdbytecnt_en> | high
| address | connected to signal <rdbyte_cnt> |
| dual address | connected to signal <dpra> |
| data in | connected to signal <w1_din> |
| data out | not connected |
| dual data out | connected to internal node |
| ram_style | Distributed |
-----------------------------------------------------------------------
INFO:Xst:1442 - The RAM contents appears to be read asynchronousely. A
synchronous read would allow you to take advantage of available block
RAM resources, for optimized device usage and improved timings. Please
refer to your documentation for coding guidelines.
Found 8x8-bit dual-port distributed RAM for signal <ram>.
-----------------------------------------------------------------------
| aspect ratio | 8-word x 8-bit |
| clock | connected to signal <clk> | rise
| write enable | connected to signal <rdbytecnt_en> | high
| address | connected to signal <rdbyte_cnt> |
| dual address | connected to signal <a> |
| data in | connected to signal <w1_din> |
| data out | not connected |
| dual data out | connected to internal node |
| ram_style | Distributed |
-----------------------------------------------------------------------
INFO:Xst:1442 - The RAM contents appears to be read asynchronousely. A
synchronous read would allow you to take advantage of available block
RAM resources, for optimized device usage and improved timings. Please
refer to your documentation for coding guidelines.
Does it mean that synthesizer infered two RAMs instead of one? Is this OK?
I'm using ISE5.2 with service pack 3.
--
Robert Pudlik