- put pkt_re outside of record
Committed on the Free edition of March Hare Software CVSNT Server. Upgrade to CVS Suite for more features and support: http://march-hare.com/cvsnt/ git-svn-id: http://moon:8086/svn/vhdl/trunk@1033 cc03376c-175c-47c8-b038-4cd826a8556b
This commit is contained in:
@@ -16,7 +16,7 @@ ENTITY emac_rx IS
|
||||
(
|
||||
clk : in STD_LOGIC;
|
||||
rst : in STD_LOGIC;
|
||||
dout_vld : out STD_LOGIC;
|
||||
dout_re : in STD_LOGIC;
|
||||
dout : out unsigned(31 downto 0);
|
||||
ctrl_in : in rx_ctrl_in_t;
|
||||
ctrl_out : out rx_ctrl_out_t;
|
||||
@@ -47,6 +47,7 @@ ARCHITECTURE behavior OF emac_rx IS
|
||||
signal reset_en : std_logic;
|
||||
|
||||
signal host_ptr : word_ptr_t;
|
||||
signal host_ptr_next : word_ptr_t;
|
||||
signal host_ram_limit : word_ptr_t;
|
||||
signal host_ram_base : word_ptr_t;
|
||||
|
||||
@@ -143,7 +144,7 @@ begin
|
||||
dout <= ram_dout_b;
|
||||
|
||||
ram_en_b <= '1';
|
||||
ram_addr_b <= host_ptr;
|
||||
ram_addr_b <= host_ptr_next;
|
||||
|
||||
ram_en_a <= '1';
|
||||
ram_din_a <= sipo32_dout;
|
||||
@@ -183,15 +184,16 @@ fill_pointer:
|
||||
process(clk)
|
||||
begin
|
||||
if rising_edge(clk) then
|
||||
dout_vld <= ctrl_in.pkt_read_en;
|
||||
if ctrl_in.pkt_req_en = '1' then
|
||||
host_ptr <= cmd_base_out;
|
||||
elsif ctrl_in.pkt_read_en = '1' then
|
||||
host_ptr <= host_ptr + 1;
|
||||
elsif dout_re = '1' then
|
||||
host_ptr <= host_ptr_next;
|
||||
end if;
|
||||
end if;
|
||||
end process;
|
||||
|
||||
host_ptr_next <= host_ptr + 1 when dout_re = '1' else host_ptr;
|
||||
|
||||
------------------------------------------------------------------
|
||||
-- Transfer stuff
|
||||
------------------------------------------------------------------
|
||||
|
||||
@@ -55,7 +55,7 @@ ARCHITECTURE behavior OF emac_top_jb IS
|
||||
signal rx_ctrl_out : rx_ctrl_out_t;
|
||||
|
||||
signal rx_dout : unsigned(31 downto 0);
|
||||
signal rx_dout_vld : std_logic;
|
||||
signal rx_dout_re : std_logic;
|
||||
|
||||
signal rx_int_en : std_logic;
|
||||
signal tx_int_en : std_logic;
|
||||
@@ -91,7 +91,7 @@ begin
|
||||
tx_din_vld <= data_write;
|
||||
tx_din <= DAT_I;
|
||||
|
||||
rx_ctrl_in.pkt_read_en <= data_read;
|
||||
rx_dout_re <= data_read;
|
||||
|
||||
------------------------------------------------------------------
|
||||
registers_write:
|
||||
@@ -177,7 +177,7 @@ registers_read:
|
||||
process(CLK_I)
|
||||
begin
|
||||
if rising_edge(CLK_I) then
|
||||
ACK_O <= rx_dout_vld;
|
||||
ACK_O <= data_read;
|
||||
DAT_O <= rx_dout;
|
||||
if reg_read = '1' then
|
||||
|
||||
@@ -266,7 +266,7 @@ inst_emac_rx : entity work.emac_rx
|
||||
(
|
||||
clk => CLK_I,
|
||||
rst => RST_I,
|
||||
dout_vld => rx_dout_vld,
|
||||
dout_re => rx_dout_re,
|
||||
dout => rx_dout,
|
||||
ctrl_in => rx_ctrl_in,
|
||||
ctrl_out => rx_ctrl_out,
|
||||
|
||||
@@ -36,7 +36,6 @@ package emac_types is
|
||||
Gbps_en : std_logic;
|
||||
reset : std_logic;
|
||||
fcs_chk_en : std_logic;
|
||||
pkt_read_en : std_logic;
|
||||
pkt_req_en : std_logic;
|
||||
pkt_free_en : std_logic;
|
||||
mac_addr : mac_addr_t;
|
||||
|
||||
Reference in New Issue
Block a user