phy: Rename rx/tx signals
This commit is contained in:
parent
3900d454f9
commit
d16f1afd9a
@ -5,7 +5,7 @@ use ieee.math_real.all;
|
|||||||
|
|
||||||
entity trashernet_phy is
|
entity trashernet_phy is
|
||||||
generic(
|
generic(
|
||||||
F_CLK : in integer
|
F_CLK : in integer -- Clock frequency
|
||||||
);
|
);
|
||||||
port(
|
port(
|
||||||
-- Global
|
-- Global
|
||||||
@ -13,16 +13,16 @@ entity trashernet_phy is
|
|||||||
rst : in std_logic; -- Asynchronous reset
|
rst : in std_logic; -- Asynchronous reset
|
||||||
|
|
||||||
-- Eth
|
-- Eth
|
||||||
data_rx : out std_logic_vector(7 downto 0); -- RX Data
|
rx_data : out std_logic_vector(7 downto 0); -- RX Data
|
||||||
data_rx_valid : out std_logic; -- RX Data valid
|
rx_data_valid : out std_logic; -- RX Data valid
|
||||||
rx_active : out std_logic; -- RX of packet in progress
|
rx_active : out std_logic; -- RX of packet in progress
|
||||||
|
|
||||||
data_tx : in std_logic_vector(7 downto 0); -- TX Data
|
tx_data : in std_logic_vector(7 downto 0); -- TX Data
|
||||||
data_tx_en : in std_logic;
|
tx_data_en : in std_logic; -- Transmitter enable
|
||||||
data_tx_ack : out std_logic; --
|
tx_data_ack : out std_logic; -- Latched data_tx
|
||||||
|
|
||||||
carrier_detect : out std_logic; --
|
carrier_detect : out std_logic; -- Carrier detected
|
||||||
rx_error : out std_logic; --
|
rx_error : out std_logic; -- Receive error
|
||||||
|
|
||||||
-- Ethernet physical signals
|
-- Ethernet physical signals
|
||||||
rx_p : in std_logic;
|
rx_p : in std_logic;
|
||||||
@ -212,17 +212,17 @@ begin
|
|||||||
bytizer : process(clk, rst) is
|
bytizer : process(clk, rst) is
|
||||||
begin
|
begin
|
||||||
if rst then
|
if rst then
|
||||||
data_rx_valid <= '0';
|
rx_data_valid <= '0';
|
||||||
data_rx <= (others => '0');
|
rx_data <= (others => '0');
|
||||||
|
|
||||||
elsif rising_edge(clk) then
|
elsif rising_edge(clk) then
|
||||||
data_rx_valid <= '0';
|
rx_data_valid <= '0';
|
||||||
|
|
||||||
if rx_active then
|
if rx_active then
|
||||||
if (bit_stb) then
|
if (bit_stb) then
|
||||||
data_rx <= bit_value & data_rx(data_rx'high downto data_rx'low + 1);
|
rx_data <= bit_value & rx_data(rx_data'high downto rx_data'low + 1);
|
||||||
if (bit_cnt = 7) then
|
if (bit_cnt = 7) then
|
||||||
data_rx_valid <= '1';
|
rx_data_valid <= '1';
|
||||||
bit_cnt <= 0;
|
bit_cnt <= 0;
|
||||||
else
|
else
|
||||||
bit_cnt <= bit_cnt + 1;
|
bit_cnt <= bit_cnt + 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user