-- -- -- DISCLAIMER -- -- This code is the sole property of the Institute for Technology -- Development (ITD), Jackson, Mississippi, and is distributed for -- the purpose of providing examples of VHDL models written to -- modeling standards. This code may not be used for commercial -- purposes, and may not be redistributed without permission from -- the Institute for Technology Development. ITD assumes no -- responsibility for errors, omissions, uses made, or decisions -- based on its use. No warranties, expressed or implied, are given. -- -- ------------------------------------------------------------------ architecture behavioral of SN54368 is -- ARCHITECTURE DECLARATIVE REGION -- Following signals added for incorporating timing constant generic_loads : loads := (tld_P3, tld_P5, tld_P7, tld_P9, tld_P11, tld_P13) ; constant generic_times : times := (tplh, tphl, tpzh, tpzl, tphz, tplz) ; constant model_times : sim_timing := get_timing(generic_loads,generic_times) ; -- Local signal declarations signal gin1,gin2 : logic_mv := 'U' ; signal ain1,ain2,ain3,ain4,ain5,ain6 : logic_mv := 'U' ; signal yout1,yout2,yout3 : logic_mv := 'U' ; signal yout4,yout5,yout6 : logic_mv := 'U' ; -- ARCHITECTURE FUNCTIONAL REGION begin -- assign pin values to internal signals after wire delay -- 'H' is to be treated as a '1', and 'L' is to be treated as '0' gin1 <= transport Filter2(G1) after twd_P1 ; ain1 <= transport Filter2(A1) after twd_P2 ; ain2 <= transport Filter2(A2) after twd_P4 ; ain3 <= transport Filter2(A3) after twd_P6 ; ain4 <= transport Filter2(A4) after twd_P10 ; ain5 <= transport Filter2(A5) after twd_P12 ; ain6 <= transport Filter2(A6) after twd_P14 ; gin2 <= transport Filter2(G2) after twd_P15 ; -- Assign internal values to output pins Y1 <= yout1 ; Y2 <= yout2 ; Y3 <= yout3 ; Y4 <= yout4 ; Y5 <= yout5 ; Y6 <= yout6 ; -- Check for invalid inputs on control input ports assert not (G1'event and ((G1 = 'U') or (G1 = 'X') or (G1 = 'Z') or (G1 = 'W'))) report "{" & ref & "} " & enum_to_char(G1) & " STATE ON G1 INPUT" severity warning ; assert not (G2'event and ((G2 = 'U') or (G2 = 'X') or (G2 = 'Z') or (G2 = 'W'))) report "{" & ref & "} " & enum_to_char(G2) & " STATE ON G2 INPUT" severity warning ; ------------------------------------------------------------------------ BUF4 : process (gin1,ain1,ain2,ain3,ain4) begin if (gin1 = '0') then if (ain1 = '0' and yout1 /= 'Z') then yout1 <= transport '1' after model_times.prop_delays.tplh ; elsif ((ain1 = '1')and yout1 /= 'Z') then yout1 <= transport '0' after model_times.prop_delays.tphl ; elsif ((ain1 = '0')and yout1 = 'Z') then yout1 <= transport '1' after model_times.prop_delays.tpzh; elsif ((ain1 = '1')and yout1 = 'Z') then yout1 <= transport '0' after model_times.prop_delays.tpzl ; elsif (ain1 = 'U') then yout1 <= 'U' ; else yout1 <= 'X' ; end if ; if (ain2 = '0' and yout2 /= 'Z') then yout2 <= transport '1' after model_times.prop_delays.tplh ; elsif (ain2 = '1' and yout2 /= 'Z') then yout2 <= transport '0' after model_times.prop_delays.tphl ; elsif (ain2 = '0' and yout2 = 'Z') then yout2 <= transport '1' after model_times.prop_delays.tpzh; elsif (ain2 = '1' and yout2 = 'Z') then yout2 <= transport '0' after model_times.prop_delays.tpzl ; elsif (ain2 = 'U') then yout2 <= 'U' ; else yout2 <= 'X' ; end if ; if (ain3 = '0' and yout3 /= 'Z') then yout3 <= transport '1' after model_times.prop_delays.tplh ; elsif (ain3 = '1' and yout3 /= 'Z') then yout3 <= transport '0' after model_times.prop_delays.tphl ; elsif (ain3 = '0' and yout3 = 'Z') then yout3 <= transport '1' after model_times.prop_delays.tpzh; elsif (ain3 = '1' and yout3 = 'Z') then yout3 <= transport '0' after model_times.prop_delays.tpzl ; elsif (ain3 = 'U') then yout3 <= 'U' ; else yout3 <= 'X' ; end if ; if (ain4 = '0' and yout4 /= 'Z') then yout4 <= transport '1' after model_times.prop_delays.tplh ; elsif (ain4 = '1' and yout4 /= 'Z') then yout4 <= transport '0' after model_times.prop_delays.tphl ; elsif (ain4 = '0' and yout4 = 'Z') then yout4 <= transport '1' after model_times.prop_delays.tpzh; elsif (ain4 = '1' and yout4 = 'Z') then yout4 <= transport '0' after model_times.prop_delays.tpzl ; elsif (ain4 = 'U') then yout4 <= 'U' ; else yout4 <= 'X' ; end if ; elsif (gin1 = '1') then if (yout1 = '0') then yout1 <= transport 'Z' after model_times.prop_delays.tplz ; elsif (yout1 = '1') then yout1 <= transport 'Z' after model_times.prop_delays.tphz ; elsif (yout1 = 'U' or yout1 = 'X') then yout1 <= transport 'Z' after MaxTime(model_times.prop_delays.tphz, model_times.prop_delays.tplz) ; elsif (yout1 /= 'Z') then yout1 <= 'X' ; end if ; if (yout2 = '0') then yout2 <= transport 'Z' after model_times.prop_delays.tplz ; elsif (yout2 = '1') then yout2 <= transport 'Z' after model_times.prop_delays.tphz ; elsif (yout2 = 'U' or yout2 = 'X') then yout2 <= transport 'Z' after MaxTime(model_times.prop_delays.tphz, model_times.prop_delays.tplz) ; elsif (yout2 /= 'Z') then yout2 <= 'X' ; end if ; if (yout3 = '0') then yout3 <= transport 'Z' after model_times.prop_delays.tplz ; elsif (yout3 = '1') then yout3 <= transport 'Z' after model_times.prop_delays.tphz ; elsif (yout3 = 'U' or yout3 = 'X') then yout3 <= transport 'Z' after MaxTime(model_times.prop_delays.tphz, model_times.prop_delays.tplz) ; elsif (yout3 /= 'Z') then yout3 <= 'X' ; end if ; if (yout4 = '0') then yout4 <= transport 'Z' after model_times.prop_delays.tplz ; elsif (yout4 = '1') then yout4 <= transport 'Z' after model_times.prop_delays.tphz ; elsif (yout4 = 'U' or yout4 = 'X') then yout4 <= transport 'Z' after MaxTime(model_times.prop_delays.tphz, model_times.prop_delays.tplz) ; elsif (yout4 /= 'Z') then yout4 <= 'X' ; end if ; elsif (gin1 = 'U') then yout1 <= 'U' ; yout2 <= 'U' ; yout3 <= 'U' ; yout4 <= 'U' ; else if (ain1 = 'U') then yout1 <= 'U' ; else yout1 <= 'X' ; end if ; if (ain2 = 'U') then yout2 <= 'U' ; else yout2 <= 'X' ; end if ; if (ain3 = 'U') then yout3 <= 'U' ; else yout3 <= 'X' ; end if ; if (ain4 = 'U') then yout4 <= 'U' ; else yout4 <= 'X' ; end if ; end if ; end process BUF4 ; ------------------------------------------------------------------------ BUF2 : process (gin2,ain5,ain6) begin if (gin2 = '0') then if (ain5 = '0' and yout5 /= 'Z') then yout5 <= transport '1' after model_times.prop_delays.tplh ; elsif (ain5 = '1' and yout5 /= 'Z') then yout5 <= transport '0' after model_times.prop_delays.tphl ; elsif (ain5 = '0' and yout5 = 'Z') then yout5 <= transport '1' after model_times.prop_delays.tpzh; elsif (ain5 = '1' and yout5 = 'Z') then yout5 <= transport '0' after model_times.prop_delays.tpzl ; elsif (ain5 = 'U') then yout5 <= 'U' ; else yout5 <= 'X' ; end if ; if (ain6 = '0' and yout6 /= 'Z') then yout6 <= transport '1' after model_times.prop_delays.tplh ; elsif (ain6 = '1' and yout6 /= 'Z') then yout6 <= transport '0' after model_times.prop_delays.tphl ; elsif (ain6 = '0' and yout6 = 'Z') then yout6 <= transport '1' after model_times.prop_delays.tpzh; elsif (ain6 = '1' and yout6 = 'Z') then yout6 <= transport '0' after model_times.prop_delays.tpzl ; elsif (ain6 = 'U') then yout6 <= 'U' ; else yout6 <= 'X' ; end if ; elsif (gin2 = '1') then if (yout5 = '0') then yout5 <= transport 'Z' after model_times.prop_delays.tplz ; elsif (yout5 = '1') then yout5 <= transport 'Z' after model_times.prop_delays.tphz ; elsif (yout5 = 'U' or yout6 = 'X') then yout5 <= transport 'Z' after MaxTime(model_times.prop_delays.tphz, model_times.prop_delays.tplz) ; elsif (yout5 /= 'Z') then yout5 <= 'X' ; end if ; if (yout6 = '0') then yout6 <= transport 'Z' after model_times.prop_delays.tplz ; elsif (yout6 = '1') then yout6 <= transport 'Z' after model_times.prop_delays.tphz ; elsif (yout6 = 'U' or yout6 = 'X') then yout6 <= transport 'Z' after MaxTime(model_times.prop_delays.tphz, model_times.prop_delays.tplz) ; elsif (yout6 /= 'Z') then yout6 <= 'X' ; end if ; elsif (gin2 = 'U') then yout5 <= 'U' ; yout6 <= 'U' ; else if (ain5 = 'U') then yout5 <= 'U' ; else yout5 <= 'X' ; end if ; if (ain6 = 'U') then yout6 <= 'U' ; else yout6 <= 'X' ; end if ; end if ; end process BUF2 ; end behavioral ;