1 -------------------------------------------------------------------------------
4 -- Design : ethernet_controller
6 -- Company : Fermi National Accelerator Laboratory
8 -------------------------------------------------------------------------------
10 -- File : d:\Projects\otsdaq\OtS Ethernet MAC firmware\ActiveHDL_proj\ethernet_controller\compile\icmp_ping_checksum_calc.vhd
11 -- Generated : 02/29/16 11:09:16
12 -- From : d:/Projects/otsdaq/OtS Ethernet MAC firmware/ActiveHDL_proj/ethernet_controller/src/icmp_ping_checksum_calc.asf
13 -- By : FSM2VHDL ver. 5.0.7.2
15 -------------------------------------------------------------------------------
19 -------------------------------------------------------------------------------
22 use IEEE.std_logic_1164.
all;
23 use ieee.numeric_std.
all;
28 req_chk_sum: in (15 downto 0);
31 resp_chk_sum: out (15 downto 0));
32 end icmp_ping_checksum_calc;
36 -- diagram signals declarations
37 signal req_chk_sum_sig: (16 downto 0);
39 -- SYMBOLIC ENCODED state machine: Sreg0
43 -- attribute ENUM_ENCODING of Sreg0_type: type is ... -- enum_encoding attribute is not supported for symbolic encoding
45 signal Sreg0: Sreg0_type;
49 -- concurrent signals assignments
53 ----------------------------------------------------------------------
55 ----------------------------------------------------------------------
56 Sreg0_machine:
process (clk)
58 if clk'event and clk = '1' then
61 -- Set default values for outputs, signals and variables
64 -- Set default values for outputs, signals and variables
69 req_chk_sum_sig <= ('0' & (not req_chk_sum));
72 req_chk_sum_sig <= req_chk_sum_sig + ('0' & x"F7FF");
75 if req_chk_sum_sig(16) = '1' then
76 req_chk_sum_sig(15 downto 0) <= req_chk_sum_sig(15 downto 0) + 1;
77 req_chk_sum_sig(16) <= '0';
81 resp_chk_sum <= not ((req_chk_sum_sig(15 downto 0)));
93 end icmp_ping_checksum_calc_arch;