subroad.tdf

来自「veriloghdl 交通灯veriloghdl 交通灯veriloghdl 交」· TDF 代码 · 共 73 行

TDF
73
字号
subdesign 		subroad
( 
	incount[4..0]:			input;
	hour[4..0]:				input;
  	subcol[1..0]:		output;
  	subout1[3..0]:			output;
	subout2[3..0]:			output;
  	subtringle:				output;
 	subdigselect:			output;
)
begin
if hour[4..0]>=b"00001" AND hour[4..0]<=b"10110"
then table
incount[4..0]=>subcol[1..0],subout1[3..0],subout2[3..0],subtringle,subdigselect;
h"0"=>b"10",h"1",h"2",0,1;
h"1"=>b"10",h"1",h"1",0,1;
h"2"=>b"10",h"1",h"0",0,1;
h"3"=>b"10",h"0",h"9",0,1;
h"4"=>b"10",h"0",h"8",0,1;
h"5"=>b"10",h"0",h"7",0,1;
h"6"=>b"10",h"0",h"6",0,1;
h"7"=>b"10",h"0",h"5",0,1;
h"8"=>b"10",h"0",h"4",0,1;
h"9"=>b"10",h"0",h"3",0,1;
h"A"=>b"10",h"0",h"2",0,1;
h"B"=>b"10",h"0",h"1",0,0;
h"C"=>b"10",h"0",h"0",0,0;
h"D"=>b"00",h"0",h"8",0,1;
h"E"=>b"00",h"0",h"7",0,1;
h"F"=>b"00",h"0",h"6",0,1;
h"10"=>b"00",h"0",h"5",0,1;
h"11"=>b"00",h"0",h"4",0,1;
h"12"=>b"00",h"0",h"3",0,1;
h"13"=>b"00",h"0",h"2",1,1;
h"14"=>b"00",h"0",h"1",1,1;
h"15"=>b"00",h"0",h"0",1,1;
h"16"=>b"01",h"0",h"1",0,0;
h"17"=>b"01",h"0",h"0",0,0;

end table;
else
table
incount[4..0]=>subcol[1..0],subout1[3..0],subout2[3..0],subtringle,subdigselect;
h"0"=>b"01",h"0",h"0",1,1;
h"1"=>b"01",h"0",h"0",1,1;
h"2"=>b"01",h"0",h"0",1,1;
h"3"=>b"01",h"0",h"0",1,1;
h"4"=>b"01",h"0",h"0",1,1;
h"5"=>b"01",h"0",h"0",1,1;
h"6"=>b"01",h"0",h"0",1,1;
h"7"=>b"01",h"0",h"0",1,1;
h"8"=>b"01",h"0",h"0",1,1;
h"9"=>b"01",h"0",h"0",1,1;
h"A"=>b"01",h"0",h"0",1,1;
h"B"=>b"01",h"0",h"0",1,1;
h"C"=>b"01",h"0",h"0",1,1;
h"D"=>b"01",h"0",h"0",1,1;
h"E"=>b"01",h"0",h"0",1,1;
h"F"=>b"01",h"0",h"0",1,1;
h"10"=>b"01",h"0",h"0",1,1;
h"11"=>b"01",h"0",h"0",1,1;
h"12"=>b"01",h"0",h"0",1,1;
h"13"=>b"01",h"0",h"0",1,1;
h"14"=>b"01",h"0",h"0",1,1;
h"15"=>b"01",h"0",h"0",1,1;
h"16"=>b"01",h"0",h"0",1,1;
h"17"=>b"01",h"0",h"0",1,1;

end table;
end if;
end;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?