This file is intended to be loaded by Logisim-evolution (https://github.com/reds-heig/logisim-evolution).
addr/data: 8 8
0
addr/data: 8 8
0
--------------------------------------------------------------------------------
-- HEIG-VD, institute REDS, 1400 Yverdon-les-Bains
-- Project :
-- File :
-- Autor :
-- Date :
--
--------------------------------------------------------------------------------
-- Description :
--
--------------------------------------------------------------------------------
library ieee;
use ieee.std_logic_1164.all;
--use ieee.numeric_std.all;
entity VHDL_Component is
port(
------------------------------------------------------------------------------
--Insert input ports below
horloge_i : in std_logic; -- input bit example
val_i : in std_logic_vector(3 downto 0); -- input vector example
------------------------------------------------------------------------------
--Insert output ports below
max_o : out std_logic; -- output bit example
cpt_o : out std_logic_Vector(3 downto 0) -- output vector example
);
end VHDL_Component;
--------------------------------------------------------------------------------
--Complete your VHDL description below
architecture type_architecture of VHDL_Component is
begin
end type_architecture;
library ieee;
use ieee.std_logic_1164.all;
entity TCL_Generic is
port(
--Insert input ports below
horloge_i : in std_logic; -- input bit example
val_i : in std_logic_vector(3 downto 0); -- input vector example
--Insert output ports below
max_o : out std_logic; -- output bit example
cpt_o : out std_logic_Vector(3 downto 0) -- output vector example
);
end TCL_Generic;
state_machine example @[50,50,800,500]{
in A[3] @[50,100,44,15];
out X[4] @[807,140,43,15];
codeWidth = 2;
reset = S0;
state S0["01"]:
@[297,181,30,30]
set X="0001"; @[297,181,30,30]
goto S3 when (A=="000") @[346,269,68,21];
goto S1 when default @[432,151,50,21];
state S1["10"]:
@[470,186,30,30]
set X="0010"; @[470,186,30,30]
goto S0 when (A=="000") @[399,230,68,21];
goto S2 when default @[533,276,50,21];
state S2["00"]:
@[471,339,30,30]
set X={"00",A[0:1],"1"}; @[471,339,30,30]
goto S1 when (A[2:1]=="11") @[557,250,90,21];
goto S3 when default @[392,398,50,21];
state S3["11"]:
@[287,325,30,30]
set X="1000"; @[287,325,30,30]
goto S2 when (A=="000") @[388,313,68,21];
goto S0 when default @[248,278,50,21];
}
state_machine example @[73,58,800,500]{
in Lhit[1] @[73,303,26,15];ACK[1] @[73,349,30,15];
out MEM[1] @[841,194,32,15];REQ[1] @[841,280,32,15];C[4] @[835,352,38,15];
codeWidth = 4;
reset = BIGBANG;
state C0["0000"]:
@[210,125,30,30]
set C="0001"; @[210,125,30,30]
goto C1 when (/Lhit) @[316,166,37,22];
goto S5 when Lhit @[209,210,26,22];
state C1["0001"]:
@[393,151,30,30]
set C="0010"; @[393,151,30,30]
goto C2 when (/Lhit) @[503,184,37,22];
goto S6 when Lhit @[416,226,26,22];
state C2["0010"]:
@[572,184,30,30]
set C="0100"; @[572,184,30,30]
goto C3 when (/Lhit) @[670,199,37,22];
goto S7 when Lhit @[584,247,26,22];
state C3["0011"]:
@[739,181,30,30]
set C="1000"; @[739,181,30,30]
goto S8 when Lhit @[763,249,26,22];
goto C0 when (/Lhit) @[484,95,37,22];
state BIGBANG["0100"]:
@[70,116,30,30]
goto C0 when default @[187,109,43,22];
state S5["0101"]:
@[195,256,30,30]
set MEM="1";C="0001"; @[195,256,30,30]
goto S9 when default @[204,327,43,22];
state S6["0110"]:
@[413,269,30,30]
set MEM="1";C="0010"; @[413,269,30,30]
goto S10 when default @[431,323,43,22];
state S7["0111"]:
@[567,287,30,30]
set MEM="1";C="0100"; @[567,287,30,30]
goto S11 when default @[582,348,43,22];
state S8["1000"]:
@[739,292,30,30]
set MEM="1";C="1000"; @[739,292,30,30]
goto S12 when default @[755,364,43,22];
state S9["1001"]:
@[157,357,30,30]
set REQ="1";MEM="0";C="0001"; @[157,357,30,30]
goto S13 when (ACK.(/Lhit)) @[204,442,72,22];
state S10["1010"]:
@[419,362,30,30]
set REQ="1";MEM="0";C="0010"; @[419,362,30,30]
goto S13 when (ACK.(/Lhit)) @[326,424,72,22];
state S11["1011"]:
@[568,389,30,30]
set REQ="1";MEM="0";C="0100"; @[568,389,30,30]
goto S13 when (ACK.(/Lhit)) @[410,444,72,22];
state S12["1100"]:
@[746,416,30,30]
set REQ="1";MEM="0";C="1000"; @[746,416,30,30]
goto S13 when (ACK.(/Lhit)) @[500,474,72,22];
state S13["1101"]:
@[150,488,30,30]
set REQ="0";MEM="0";C="0000"; @[150,488,30,30]
goto C0 when (/ACK) @[125,301,41,22];
}