Примеры кода для A-C4E6E10.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
a-c4e6e10_exemple/AHDL_test/7seg_driver.tdf.bak

25 lines
716 B

subdesign 7seg_driver (DP, D[0..3]: input = VCC; SEG[0..7]: output;)
begin
SEG[7] = DP;
case d[] is
when 0 => SEG[0..6] = b"0000001";
when 1 => SEG[0..6] = b"1001111";
when 2 => SEG[0..6] = b"0010010";
when 3 => SEG[0..6] = b"0000110";
when 4 => SEG[0..6] = b"1001100";
when 5 => SEG[0..6] = b"0100100";
when 6 => SEG[0..6] = b"0100000";
when 7 => SEG[0..6] = b"0001111";
when 8 => SEG[0..6] = b"0000000";
when 9 => SEG[0..6] = b"0000100";
when 10 => SEG[0..6] = b"0001000";
when 11 => SEG[0..6] = b"1100000";
when 12 => SEG[0..6] = b"0110001";
when 13 => SEG[0..6] = b"1000010";
when 14 => SEG[0..6] = b"0110000";
when 15 => SEG[0..6] = b"0111000";
when others => SEG[0..6] = VCC;
end case;
end;