shaiko
Advanced Member level 5
- Joined
- Aug 20, 2011
- Messages
- 2,644
- Helped
- 303
- Reputation
- 608
- Reaction score
- 297
- Trophy points
- 1,363
- Activity points
- 18,302
LIBRARY ieee;
USE ieee.std_logic_1164.all;
LIBRARY altera_mf;
USE altera_mf.all;
ENTITY altera_fifo IS
PORT
(
clock : IN STD_LOGIC ;
data : IN STD_LOGIC_VECTOR (7 DOWNTO 0);
rdreq : IN STD_LOGIC ;
wrreq : IN STD_LOGIC ;
empty : OUT STD_LOGIC ;
full : OUT STD_LOGIC ;
q : OUT STD_LOGIC_VECTOR (7 DOWNTO 0);
usedw : OUT STD_LOGIC_VECTOR (3 DOWNTO 0)
);
END altera_fifo;
ARCHITECTURE SYN OF altera_fifo IS
SIGNAL sub_wire0 : STD_LOGIC ;
SIGNAL sub_wire1 : STD_LOGIC ;
SIGNAL sub_wire2 : STD_LOGIC_VECTOR (7 DOWNTO 0);
SIGNAL sub_wire3 : STD_LOGIC_VECTOR (3 DOWNTO 0);
COMPONENT scfifo
GENERIC (
add_ram_output_register : STRING;
intended_device_family : STRING;
lpm_numwords : NATURAL;
lpm_showahead : STRING;
lpm_type : STRING;
lpm_width : NATURAL;
lpm_widthu : NATURAL;
overflow_checking : STRING;
underflow_checking : STRING;
use_eab : STRING
);
PORT (
clock : IN STD_LOGIC ;
data : IN STD_LOGIC_VECTOR (7 DOWNTO 0);
rdreq : IN STD_LOGIC ;
wrreq : IN STD_LOGIC ;
empty : OUT STD_LOGIC ;
full : OUT STD_LOGIC ;
q : OUT STD_LOGIC_VECTOR (7 DOWNTO 0);
usedw : OUT STD_LOGIC_VECTOR (3 DOWNTO 0)
);
END COMPONENT;
BEGIN
empty <= sub_wire0;
full <= sub_wire1;
q <= sub_wire2(7 DOWNTO 0);
usedw <= sub_wire3(3 DOWNTO 0);
scfifo_component : scfifo
GENERIC MAP (
add_ram_output_register => "ON",
intended_device_family => "Stratix V",
lpm_numwords => 16,
lpm_showahead => "OFF",
lpm_type => "scfifo",
lpm_width => 8,
lpm_widthu => 4,
overflow_checking => "ON",
underflow_checking => "ON",
use_eab => "ON"
)
PORT MAP (
clock => clock,
data => data,
rdreq => rdreq,
wrreq => wrreq,
empty => sub_wire0,
full => sub_wire1,
q => sub_wire2,
usedw => sub_wire3
);
END SYN;
Yet they find fit to update the control flags on the rising edge - Why the difference??doing updates on the falling edge is a way to understand the waves a little better
scfifo_component : scfifo
GENERIC MAP (
add_ram_output_register => "OFF",
intended_device_family => "Cyclone IV E",
lpm_numwords => 256,
lpm_showahead => "ON",
lpm_type => "scfifo",
lpm_width => 8,
lpm_widthu => 8,
overflow_checking => "ON",
underflow_checking => "ON",
use_eab => "ON"
)
PORT MAP (
clock => clock,
data => data,
rdreq => rdreq,
wrreq => wrreq,
empty => sub_wire0,
full => sub_wire1,
q => sub_wire2,
usedw => sub_wire3
);
It isn't just about the model - it's about the setting not taking effect ( add_ram_output_register => "OFF" ).In my mind, how the model works internally is immaterial
It doesn't...aslong as the interface behaves as expected.
It isn't just about the model - it's about the setting not taking effect ( add_ram_output_register => "OFF" ).
It doesn't...
The FIFO's RAM is configured to have a non-registered output. Yet the output comes out registered regardless of the configuration in place.
Are you changing the altera_fifo.vhd code you posted in #1, by manually changing add_ram_output_register => "ON" to add_ram_output_register => "OFF"?
If so, that is likely why the behavior doesn't change.
If you want to change the behavior of the FIFO you have to change the settings when generating the core as the megafunction wizard will change the underlying simulation code depending on what features you request.
Altera cores just create a wrapper to a VHDL library. So modifying the generated wrapper should modify the setup. It means you can easily bypass the wizard and just instantiate these things yourself, unlike the Xilinx controlling philosphy of forcing you to use the coregen.
So I guess that means Altera doesn't auto-generate code using perl scripts in the background, All the simulation code then exists with all the options controlled by the generics?
Yes,Are you changing the altera_fifo.vhd code you posted in #1, by manually changing add_ram_output_register => "ON" to add_ram_output_register => "OFF"?
Yes - you can even browse the source code for all of the altera_mf library (its 10s of thousands of lines in 1 file!)
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?