Исправил работу светодиодов в регистре LEDS блока TEST. Поменял местами Er0_in и Er0_out - не схеме названы некорректно.

This commit is contained in:
sokolovstanislav 2024-04-11 18:49:35 +03:00
parent 5adc23b007
commit f72d466925
5 changed files with 89 additions and 53 deletions

View File

@ -2336,7 +2336,7 @@ applicable agreement for further details.
(symbol (symbol
(rect 1048 2136 1376 2280) (rect 1048 2136 1376 2280)
(text "RAM9X8_TEST" (rect 5 0 78 12)(font "Arial" )) (text "RAM9X8_TEST" (rect 5 0 78 12)(font "Arial" ))
(text "inst24" (rect 8 128 37 140)(font "Arial" )) (text "inst23" (rect 8 128 37 140)(font "Arial" ))
(port (port
(pt 0 32) (pt 0 32)
(input) (input)
@ -2386,6 +2386,13 @@ applicable agreement for further details.
(text "leds[3..0]" (rect 269 43 315 55)(font "Arial" )) (text "leds[3..0]" (rect 269 43 315 55)(font "Arial" ))
(line (pt 328 48)(pt 312 48)(line_width 3)) (line (pt 328 48)(pt 312 48)(line_width 3))
) )
(port
(pt 328 64)
(output)
(text "er0_out" (rect 0 0 36 12)(font "Arial" ))
(text "er0_out" (rect 277 59 313 71)(font "Arial" ))
(line (pt 328 64)(pt 312 64))
)
(port (port
(pt 328 32) (pt 328 32)
(bidir) (bidir)
@ -2773,10 +2780,6 @@ applicable agreement for further details.
(pt 1840 -48) (pt 1840 -48)
(pt 1368 -48) (pt 1368 -48)
) )
(connector
(pt 1840 -32)
(pt 1368 -32)
)
(connector (connector
(pt 1840 -16) (pt 1840 -16)
(pt 1368 -16) (pt 1368 -16)
@ -3126,11 +3129,6 @@ applicable agreement for further details.
(pt 1856 2112) (pt 1856 2112)
(bus) (bus)
) )
(connector
(pt 1496 272)
(pt 1496 1432)
(bus)
)
(connector (connector
(pt 608 1512) (pt 608 1512)
(pt 704 1512) (pt 704 1512)
@ -3232,6 +3230,64 @@ applicable agreement for further details.
(pt 936 1528) (pt 936 1528)
(pt 936 1496) (pt 936 1496)
) )
(connector
(text "leds[0]" (rect 1794 2168 1827 2180)(font "Arial" ))
(pt 1784 2184)
(pt 1856 2184)
)
(connector
(pt 1784 2184)
(pt 1784 2200)
(bus)
)
(connector
(text "leds[1]" (rect 1794 2184 1827 2196)(font "Arial" ))
(pt 1784 2200)
(pt 1856 2200)
)
(connector
(text "leds[2]" (rect 1794 2200 1827 2212)(font "Arial" ))
(pt 1784 2216)
(pt 1856 2216)
)
(connector
(pt 1784 2200)
(pt 1784 2216)
(bus)
)
(connector
(pt 1784 2216)
(pt 1784 2232)
(bus)
)
(connector
(text "leds[3]" (rect 1794 2216 1827 2228)(font "Arial" ))
(pt 1856 2232)
(pt 1784 2232)
)
(connector
(pt 1368 576)
(pt 1496 576)
(bus)
)
(connector
(pt 1496 272)
(pt 1496 576)
(bus)
)
(connector
(pt 1496 576)
(pt 1496 1432)
(bus)
)
(connector
(pt 1840 -32)
(pt 1456 -32)
)
(connector
(pt 1456 2200)
(pt 1456 -32)
)
(connector (connector
(pt 1000 2184) (pt 1000 2184)
(pt 1048 2184) (pt 1048 2184)
@ -3266,6 +3322,12 @@ applicable agreement for further details.
(pt 904 2248) (pt 904 2248)
(pt 1048 2248) (pt 1048 2248)
) )
(connector
(text "leds[3..0]" (rect 1386 2168 1432 2180)(font "Arial" ))
(pt 1784 2184)
(pt 1376 2184)
(bus)
)
(connector (connector
(pt 800 -32) (pt 800 -32)
(pt 904 -32) (pt 904 -32)
@ -3327,45 +3389,8 @@ applicable agreement for further details.
(pt 608 2168) (pt 608 2168)
) )
(connector (connector
(text "leds[3..0]" (rect 1386 2168 1432 2180)(font "Arial" )) (pt 1376 2200)
(pt 1376 2184) (pt 1456 2200)
(pt 1784 2184)
(bus)
)
(connector
(text "leds[0]" (rect 1794 2168 1827 2180)(font "Arial" ))
(pt 1784 2184)
(pt 1856 2184)
)
(connector
(pt 1784 2184)
(pt 1784 2200)
(bus)
)
(connector
(text "leds[1]" (rect 1794 2184 1827 2196)(font "Arial" ))
(pt 1784 2200)
(pt 1856 2200)
)
(connector
(text "leds[2]" (rect 1794 2200 1827 2212)(font "Arial" ))
(pt 1784 2216)
(pt 1856 2216)
)
(connector
(pt 1784 2200)
(pt 1784 2216)
(bus)
)
(connector
(pt 1784 2216)
(pt 1784 2232)
(bus)
)
(connector
(text "leds[3]" (rect 1794 2216 1827 2228)(font "Arial" ))
(pt 1856 2232)
(pt 1784 2232)
) )
(junction (pt 1000 288)) (junction (pt 1000 288))
(junction (pt 984 304)) (junction (pt 984 304))
@ -3425,3 +3450,4 @@ applicable agreement for further details.
(junction (pt 1784 2184)) (junction (pt 1784 2184))
(junction (pt 1784 2200)) (junction (pt 1784 2200))
(junction (pt 1784 2216)) (junction (pt 1784 2216))
(junction (pt 1496 576))

View File

@ -295,8 +295,8 @@ set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to LoadMode
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to Reset set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to Reset
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to RW set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to RW
set_location_assignment PIN_50 -to HWPCLK set_location_assignment PIN_50 -to HWPCLK
set_location_assignment PIN_45 -to Error0In set_location_assignment PIN_41 -to Error0In
set_location_assignment PIN_41 -to Error0Out set_location_assignment PIN_45 -to Error0Out
set_location_assignment PIN_12 -to LoadMode set_location_assignment PIN_12 -to LoadMode
set_location_assignment PIN_65 -to RW set_location_assignment PIN_65 -to RW
set_location_assignment PIN_64 -to Reset set_location_assignment PIN_64 -to Reset

View File

@ -72,6 +72,13 @@ applicable agreement for further details.
(text "leds[3..0]" (rect 272 43 307 55)(font "Arial" )) (text "leds[3..0]" (rect 272 43 307 55)(font "Arial" ))
(line (pt 328 48)(pt 312 48)(line_width 3)) (line (pt 328 48)(pt 312 48)(line_width 3))
) )
(port
(pt 328 64)
(output)
(text "er0_out" (rect 0 0 30 12)(font "Arial" ))
(text "er0_out" (rect 277 59 307 71)(font "Arial" ))
(line (pt 328 64)(pt 312 64)(line_width 1))
)
(port (port
(pt 328 32) (pt 328 32)
(bidir) (bidir)

View File

@ -24,7 +24,8 @@ entity RAM9X8_TEST is
ce : in std_logic; ce : in std_logic;
er0_in : in std_logic; er0_in : in std_logic;
leds : out std_logic_vector(3 downto 0) leds : out std_logic_vector(3 downto 0);
er0_out : out std_logic
); );
end entity; end entity;
@ -39,7 +40,8 @@ begin
begin begin
if (ce = '0') then -- Если микросхема выбрана if (ce = '0') then -- Если микросхема выбрана
addr := conv_integer(address); addr := conv_integer(address);
if (addr = REG_ADDR_TEST_UPPER_BYTE or addr = REG_ADDR_TEST_LOWER_BYTE) then if (addr = REG_ADDR_TEST_UPPER_BYTE or addr = REG_ADDR_TEST_LOWER_BYTE
or addr = REG_ADDR_LEDS_LOWER_BYTE or addr = REG_ADDR_LEDS_UPPER_BYTE) then
if (oe = '0' and we = '1') then -- Если сигнал чтения активен, а записи нет if (oe = '0' and we = '1') then -- Если сигнал чтения активен, а записи нет
case addr is case addr is
when REG_ADDR_TEST_UPPER_BYTE => when REG_ADDR_TEST_UPPER_BYTE =>
@ -78,6 +80,7 @@ begin
begin begin
if rising_edge(clk) then if rising_edge(clk) then
leds <= ledsBuf(3 downto 0); leds <= ledsBuf(3 downto 0);
er0_out <= ledsBuf(15);
end if; end if;
end process; end process;

Binary file not shown.