First time i am working with the design using Ethernet (Wiznet W5300). So i need your help from guys. Initially i have taken the exercise that I need run the 8-bit counter in NIOS using W5300.
Counter code as below
module counter #(parameter WIDTH=8) ( input clk, enable, rst_n, output reg [WIDTH-1:0] count ); always @ (posedge clk or negedge rst_n) begin if (~rst_n) count <= 0; else if (enable == 1'b1) count <= count + 1; end endmodule
library ieee; use ieee.std_logic_1164.all; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; entity Instanstation is port ( count : out std_logic_vector(7 downto 0); -- 120 will be direct , group (T) 8 will be TTL enable : in std_logic; clk : in std_logic ); end Instanstation; architecture behav of Instanstation is signal WD_nRSTs : std_logic; signal RPC_OUT_AUX : std_logic_vector(7 downto 0); component counter is port ( clk : in std_logic; -- 120 will be direct , group (T) 8 will be TTL enable : in std_logic; rst_n : in std_logic; count : out std_logic_vector (7 downto 0)); end component; begin count(7 downto 0) <= RPC_OUT_AUX(7 downto 0); end behav;
Can anyone suggest me whether my design flow is right or wrong. Then how to interface the NIOS and WIZNET.
Altera : Top file
First, it 's recommended to start with one of the reference designs "Golden Top" to initiate every thing like pins assignments, top level file and etc. Later you can refer to the W5300 datasheet to decide how you are going to connect it.
Thanks for your response. I know to initiate pins assignments, top level, etc. Please tell me to interface NIOS and WIZNET 5300. What Qsys component IP i should use. Please explain design flow. Currently i am trying to use tri-state conduit bridge and controller.
Great, once you have your pins and top level are ready, now please check the MDIO IP to know how to access the W5300 registers for configurations and data transfer.
For low latency Ethernet please check the following: