Изменили все LOWER и UPPER адреса в словах так как контроллер передает сначала младший байт потом старший.

This commit is contained in:
sokolovstanislav 2024-04-08 12:29:11 +03:00
parent d5abda1db4
commit a9a45aaad4
15 changed files with 909 additions and 946 deletions

File diff suppressed because it is too large Load Diff

View File

@ -87,42 +87,42 @@ applicable agreement for further details.
(line (pt 328 32)(pt 312 32)(line_width 3)) (line (pt 328 32)(pt 312 32)(line_width 3))
) )
(parameter (parameter
"REG_ADDR_CMD_2_UPPER_BYTE" "REG_ADDR_CMD_2_LOWER_BYTE"
"46" "46"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_CMD_2_LOWER_BYTE" "REG_ADDR_CMD_2_UPPER_BYTE"
"47" "47"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_CMD_1_UPPER_BYTE" "REG_ADDR_CMD_1_LOWER_BYTE"
"48" "48"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_CMD_1_LOWER_BYTE" "REG_ADDR_CMD_1_UPPER_BYTE"
"49" "49"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_DATA_2_UPPER_BYTE" "REG_ADDR_DATA_2_LOWER_BYTE"
"50" "50"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_DATA_2_LOWER_BYTE" "REG_ADDR_DATA_2_UPPER_BYTE"
"51" "51"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_DATA_1_UPPER_BYTE" "REG_ADDR_DATA_1_LOWER_BYTE"
"52" "52"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_DATA_1_LOWER_BYTE" "REG_ADDR_DATA_1_UPPER_BYTE"
"53" "53"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )

View File

@ -5,14 +5,14 @@ use ieee.std_logic_unsigned.all;
entity RAM9X8_HWPBusMaster is entity RAM9X8_HWPBusMaster is
generic( generic(
REG_ADDR_CMD_2_UPPER_BYTE : integer := 46; REG_ADDR_CMD_2_LOWER_BYTE : integer := 46;
REG_ADDR_CMD_2_LOWER_BYTE : integer := 47; REG_ADDR_CMD_2_UPPER_BYTE : integer := 47;
REG_ADDR_CMD_1_UPPER_BYTE : integer := 48; REG_ADDR_CMD_1_LOWER_BYTE : integer := 48;
REG_ADDR_CMD_1_LOWER_BYTE : integer := 49; REG_ADDR_CMD_1_UPPER_BYTE : integer := 49;
REG_ADDR_DATA_2_UPPER_BYTE : integer := 50; REG_ADDR_DATA_2_LOWER_BYTE : integer := 50;
REG_ADDR_DATA_2_LOWER_BYTE : integer := 51; REG_ADDR_DATA_2_UPPER_BYTE : integer := 51;
REG_ADDR_DATA_1_UPPER_BYTE : integer := 52; REG_ADDR_DATA_1_LOWER_BYTE : integer := 52;
REG_ADDR_DATA_1_LOWER_BYTE : integer := 53; REG_ADDR_DATA_1_UPPER_BYTE : integer := 53;
DATA_BUS_WIDTH : integer := 8; DATA_BUS_WIDTH : integer := 8;
ADDRESS_BUS_WIDTH : integer := 9 ADDRESS_BUS_WIDTH : integer := 9

View File

@ -94,32 +94,32 @@ applicable agreement for further details.
(line (pt 328 32)(pt 312 32)(line_width 3)) (line (pt 328 32)(pt 312 32)(line_width 3))
) )
(parameter (parameter
"REG_ADDR_ACTIVE_DEVICE_UPPER_BYTE" "REG_ADDR_ACTIVE_DEVICE_LOWER_BYTE"
"38" "38"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_ACTIVE_DEVICE_LOWER_BYTE" "REG_ADDR_ACTIVE_DEVICE_UPPER_BYTE"
"39" "39"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_TEST_UPPER_BYTE" "REG_ADDR_TEST_LOWER_BYTE"
"40" "40"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_TEST_LOWER_BYTE" "REG_ADDR_TEST_UPPER_BYTE"
"41" "41"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_VERSION_UPPER_BYTE" "REG_ADDR_VERSION_LOWER_BYTE"
"42" "42"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_VERSION_LOWER_BYTE" "REG_ADDR_VERSION_UPPER_BYTE"
"43" "43"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )

View File

@ -5,12 +5,12 @@ use ieee.std_logic_unsigned.all;
entity RAM9X8_LedController is entity RAM9X8_LedController is
generic( generic(
REG_ADDR_ACTIVE_DEVICE_UPPER_BYTE : integer := 38; REG_ADDR_ACTIVE_DEVICE_LOWER_BYTE : integer := 38;
REG_ADDR_ACTIVE_DEVICE_LOWER_BYTE : integer := 39; REG_ADDR_ACTIVE_DEVICE_UPPER_BYTE : integer := 39;
REG_ADDR_TEST_UPPER_BYTE : integer := 40; REG_ADDR_TEST_LOWER_BYTE : integer := 40;
REG_ADDR_TEST_LOWER_BYTE : integer := 41; REG_ADDR_TEST_UPPER_BYTE : integer := 41;
REG_ADDR_VERSION_UPPER_BYTE : integer := 42; REG_ADDR_VERSION_LOWER_BYTE : integer := 42;
REG_ADDR_VERSION_LOWER_BYTE : integer := 43; REG_ADDR_VERSION_UPPER_BYTE : integer := 43;
DATA_BUS_WIDTH : integer := 8; DATA_BUS_WIDTH : integer := 8;
ADDRESS_BUS_WIDTH : integer := 9 ADDRESS_BUS_WIDTH : integer := 9
@ -61,7 +61,8 @@ begin
if (ce = '0') then -- Если микросхема выбрана if (ce = '0') then -- Если микросхема выбрана
addr := conv_integer(address); addr := conv_integer(address);
if (addr = REG_ADDR_ACTIVE_DEVICE_UPPER_BYTE or addr = REG_ADDR_ACTIVE_DEVICE_LOWER_BYTE if (addr = REG_ADDR_ACTIVE_DEVICE_UPPER_BYTE or addr = REG_ADDR_ACTIVE_DEVICE_LOWER_BYTE
or addr = REG_ADDR_TEST_UPPER_BYTE or addr = REG_ADDR_TEST_LOWER_BYTE) then or addr = REG_ADDR_TEST_UPPER_BYTE or addr = REG_ADDR_TEST_LOWER_BYTE
or addr = REG_ADDR_VERSION_UPPER_BYTE or addr = REG_ADDR_VERSION_LOWER_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_ACTIVE_DEVICE_UPPER_BYTE => when REG_ADDR_ACTIVE_DEVICE_UPPER_BYTE =>

View File

@ -143,12 +143,12 @@ applicable agreement for further details.
(line (pt 328 32)(pt 312 32)(line_width 3)) (line (pt 328 32)(pt 312 32)(line_width 3))
) )
(parameter (parameter
"REG_ADDR_LOADER_UPPER_BYTE" "REG_ADDR_LOADER_LOWER_BYTE"
"44" "44"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_LOADER_LOWER_BYTE" "REG_ADDR_LOADER_UPPER_BYTE"
"45" "45"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )

View File

@ -5,8 +5,8 @@ use ieee.std_logic_unsigned.all;
entity RAM9X8_Loader is entity RAM9X8_Loader is
generic( generic(
REG_ADDR_LOADER_UPPER_BYTE : integer := 44; REG_ADDR_LOADER_LOWER_BYTE : integer := 44;
REG_ADDR_LOADER_LOWER_BYTE : integer := 45; REG_ADDR_LOADER_UPPER_BYTE : integer := 45;
DATA_BUS_WIDTH : integer := 8; DATA_BUS_WIDTH : integer := 8;
ADDRESS_BUS_WIDTH : integer := 9 ADDRESS_BUS_WIDTH : integer := 9

View File

@ -80,92 +80,92 @@ applicable agreement for further details.
(line (pt 328 32)(pt 312 32)(line_width 3)) (line (pt 328 32)(pt 312 32)(line_width 3))
) )
(parameter (parameter
"REG_ADDR_CMD_UPPER_BYTE" "REG_ADDR_CMD_LOWER_BYTE"
"54" "54"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_CMD_LOWER_BYTE" "REG_ADDR_CMD_UPPER_BYTE"
"55" "55"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_WORD_8_UPPER_BYTE" "REG_ADDR_WORD_8_LOWER_BYTE"
"56" "56"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_WORD_8_LOWER_BYTE" "REG_ADDR_WORD_8_UPPER_BYTE"
"57" "57"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_WORD_7_UPPER_BYTE" "REG_ADDR_WORD_7_LOWER_BYTE"
"58" "58"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_WORD_7_LOWER_BYTE" "REG_ADDR_WORD_7_UPPER_BYTE"
"59" "59"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_WORD_6_UPPER_BYTE" "REG_ADDR_WORD_6_LOWER_BYTE"
"60" "60"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_WORD_6_LOWER_BYTE" "REG_ADDR_WORD_6_UPPER_BYTE"
"61" "61"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_WORD_5_UPPER_BYTE" "REG_ADDR_WORD_5_LOWER_BYTE"
"62" "62"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_WORD_5_LOWER_BYTE" "REG_ADDR_WORD_5_UPPER_BYTE"
"63" "63"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_WORD_4_UPPER_BYTE" "REG_ADDR_WORD_4_LOWER_BYTE"
"64" "64"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_WORD_4_LOWER_BYTE" "REG_ADDR_WORD_4_UPPER_BYTE"
"65" "65"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_WORD_3_UPPER_BYTE" "REG_ADDR_WORD_3_LOWER_BYTE"
"66" "66"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_WORD_3_LOWER_BYTE" "REG_ADDR_WORD_3_UPPER_BYTE"
"67" "67"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_WORD_2_UPPER_BYTE" "REG_ADDR_WORD_2_LOWER_BYTE"
"68" "68"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_WORD_2_LOWER_BYTE" "REG_ADDR_WORD_2_UPPER_BYTE"
"69" "69"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_WORD_1_UPPER_BYTE" "REG_ADDR_WORD_1_LOWER_BYTE"
"70" "70"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_WORD_1_LOWER_BYTE" "REG_ADDR_WORD_1_UPPER_BYTE"
"71" "71"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )

View File

@ -5,24 +5,24 @@ use ieee.std_logic_unsigned.all;
entity RAM9X8_OpticalBusMaster is entity RAM9X8_OpticalBusMaster is
generic( generic(
REG_ADDR_CMD_UPPER_BYTE : integer := 54; REG_ADDR_CMD_LOWER_BYTE : integer := 54;
REG_ADDR_CMD_LOWER_BYTE : integer := 55; REG_ADDR_CMD_UPPER_BYTE : integer := 55;
REG_ADDR_WORD_8_UPPER_BYTE : integer := 56; REG_ADDR_WORD_8_LOWER_BYTE : integer := 56;
REG_ADDR_WORD_8_LOWER_BYTE : integer := 57; REG_ADDR_WORD_8_UPPER_BYTE : integer := 57;
REG_ADDR_WORD_7_UPPER_BYTE : integer := 58; REG_ADDR_WORD_7_LOWER_BYTE : integer := 58;
REG_ADDR_WORD_7_LOWER_BYTE : integer := 59; REG_ADDR_WORD_7_UPPER_BYTE : integer := 59;
REG_ADDR_WORD_6_UPPER_BYTE : integer := 60; REG_ADDR_WORD_6_LOWER_BYTE : integer := 60;
REG_ADDR_WORD_6_LOWER_BYTE : integer := 61; REG_ADDR_WORD_6_UPPER_BYTE : integer := 61;
REG_ADDR_WORD_5_UPPER_BYTE : integer := 62; REG_ADDR_WORD_5_LOWER_BYTE : integer := 62;
REG_ADDR_WORD_5_LOWER_BYTE : integer := 63; REG_ADDR_WORD_5_UPPER_BYTE : integer := 63;
REG_ADDR_WORD_4_UPPER_BYTE : integer := 64; REG_ADDR_WORD_4_LOWER_BYTE : integer := 64;
REG_ADDR_WORD_4_LOWER_BYTE : integer := 65; REG_ADDR_WORD_4_UPPER_BYTE : integer := 65;
REG_ADDR_WORD_3_UPPER_BYTE : integer := 66; REG_ADDR_WORD_3_LOWER_BYTE : integer := 66;
REG_ADDR_WORD_3_LOWER_BYTE : integer := 67; REG_ADDR_WORD_3_UPPER_BYTE : integer := 67;
REG_ADDR_WORD_2_UPPER_BYTE : integer := 68; REG_ADDR_WORD_2_LOWER_BYTE : integer := 68;
REG_ADDR_WORD_2_LOWER_BYTE : integer := 69; REG_ADDR_WORD_2_UPPER_BYTE : integer := 69;
REG_ADDR_WORD_1_UPPER_BYTE : integer := 70; REG_ADDR_WORD_1_LOWER_BYTE : integer := 70;
REG_ADDR_WORD_1_LOWER_BYTE : integer := 71; REG_ADDR_WORD_1_UPPER_BYTE : integer := 71;
DATA_BUS_WIDTH : integer := 8; DATA_BUS_WIDTH : integer := 8;
ADDRESS_BUS_WIDTH : integer := 9 ADDRESS_BUS_WIDTH : integer := 9
@ -159,7 +159,7 @@ begin
when others => when others =>
data <= (others => 'Z'); -- Запретить запись на шину data <= (others => 'Z'); -- Запретить запись на шину
end case; end case;
if (addr = REG_ADDR_WORD_1_LOWER_BYTE) then if (addr = REG_ADDR_WORD_1_UPPER_BYTE) then
start <= '1'; start <= '1';
else else
start <= '0'; start <= '0';

View File

@ -94,122 +94,122 @@ applicable agreement for further details.
(line (pt 328 32)(pt 312 32)(line_width 3)) (line (pt 328 32)(pt 312 32)(line_width 3))
) )
(parameter (parameter
"REG_ADDR_MODE_CONTROL_UPPER_BYTE" "REG_ADDR_MODE_CONTROL_LOWER_BYTE"
"14" "14"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_MODE_CONTROL_LOWER_BYTE" "REG_ADDR_MODE_CONTROL_UPPER_BYTE"
"15" "15"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_MASK_2_UPPER_BYTE" "REG_ADDR_MASK_2_LOWER_BYTE"
"16" "16"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_MASK_2_LOWER_BYTE" "REG_ADDR_MASK_2_UPPER_BYTE"
"17" "17"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_MASK_1_UPPER_BYTE" "REG_ADDR_MASK_1_LOWER_BYTE"
"18" "18"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_MASK_1_LOWER_BYTE" "REG_ADDR_MASK_1_UPPER_BYTE"
"19" "19"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_DIRECT_CONTROL_2_UPPER_BYTE" "REG_ADDR_DIRECT_CONTROL_2_LOWER_BYTE"
"20" "20"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_DIRECT_CONTROL_2_LOWER_BYTE" "REG_ADDR_DIRECT_CONTROL_2_UPPER_BYTE"
"21" "21"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_DIRECT_CONTROL_1_UPPER_BYTE" "REG_ADDR_DIRECT_CONTROL_1_LOWER_BYTE"
"22" "22"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_DIRECT_CONTROL_1_LOWER_BYTE" "REG_ADDR_DIRECT_CONTROL_1_UPPER_BYTE"
"23" "23"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_PERIOD_UPPER_BYTE" "REG_ADDR_PERIOD_LOWER_BYTE"
"24" "24"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_PERIOD_LOWER_BYTE" "REG_ADDR_PERIOD_UPPER_BYTE"
"25" "25"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_DIRECTION_2_UPPER_BYTE" "REG_ADDR_DIRECTION_2_LOWER_BYTE"
"26" "26"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_DIRECTION_2_LOWER_BYTE" "REG_ADDR_DIRECTION_2_UPPER_BYTE"
"27" "27"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_DIRECTION_1_UPPER_BYTE" "REG_ADDR_DIRECTION_1_LOWER_BYTE"
"28" "28"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_DIRECTION_1_LOWER_BYTE" "REG_ADDR_DIRECTION_1_UPPER_BYTE"
"29" "29"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_CHANNEL_UPPER_BYTE" "REG_ADDR_CHANNEL_LOWER_BYTE"
"30" "30"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_CHANNEL_LOWER_BYTE" "REG_ADDR_CHANNEL_UPPER_BYTE"
"31" "31"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_TIMING_UPPER_BYTE" "REG_ADDR_TIMING_LOWER_BYTE"
"32" "32"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_TIMING_LOWER_BYTE" "REG_ADDR_TIMING_UPPER_BYTE"
"33" "33"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_CMD_UPPER_BYTE" "REG_ADDR_CMD_LOWER_BYTE"
"34" "34"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_CMD_LOWER_BYTE" "REG_ADDR_CMD_UPPER_BYTE"
"35" "35"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_CONTROL_UPPER_BYTE" "REG_ADDR_CONTROL_LOWER_BYTE"
"36" "36"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_CONTROL_LOWER_BYTE" "REG_ADDR_CONTROL_UPPER_BYTE"
"37" "37"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )

View File

@ -5,30 +5,30 @@ use ieee.std_logic_unsigned.all;
entity RAM9X8_PWM is entity RAM9X8_PWM is
generic( generic(
REG_ADDR_MODE_CONTROL_UPPER_BYTE : integer := 14; REG_ADDR_MODE_CONTROL_LOWER_BYTE : integer := 14;
REG_ADDR_MODE_CONTROL_LOWER_BYTE : integer := 15; REG_ADDR_MODE_CONTROL_UPPER_BYTE : integer := 15;
REG_ADDR_MASK_2_UPPER_BYTE : integer := 16; REG_ADDR_MASK_2_LOWER_BYTE : integer := 16;
REG_ADDR_MASK_2_LOWER_BYTE : integer := 17; REG_ADDR_MASK_2_UPPER_BYTE : integer := 17;
REG_ADDR_MASK_1_UPPER_BYTE : integer := 18; REG_ADDR_MASK_1_LOWER_BYTE : integer := 18;
REG_ADDR_MASK_1_LOWER_BYTE : integer := 19; REG_ADDR_MASK_1_UPPER_BYTE : integer := 19;
REG_ADDR_DIRECT_CONTROL_2_UPPER_BYTE : integer := 20; REG_ADDR_DIRECT_CONTROL_2_LOWER_BYTE : integer := 20;
REG_ADDR_DIRECT_CONTROL_2_LOWER_BYTE : integer := 21; REG_ADDR_DIRECT_CONTROL_2_UPPER_BYTE : integer := 21;
REG_ADDR_DIRECT_CONTROL_1_UPPER_BYTE : integer := 22; REG_ADDR_DIRECT_CONTROL_1_LOWER_BYTE : integer := 22;
REG_ADDR_DIRECT_CONTROL_1_LOWER_BYTE : integer := 23; REG_ADDR_DIRECT_CONTROL_1_UPPER_BYTE : integer := 23;
REG_ADDR_PERIOD_UPPER_BYTE : integer := 24; REG_ADDR_PERIOD_LOWER_BYTE : integer := 24;
REG_ADDR_PERIOD_LOWER_BYTE : integer := 25; REG_ADDR_PERIOD_UPPER_BYTE : integer := 25;
REG_ADDR_DIRECTION_2_UPPER_BYTE : integer := 26; REG_ADDR_DIRECTION_2_LOWER_BYTE : integer := 26;
REG_ADDR_DIRECTION_2_LOWER_BYTE : integer := 27; REG_ADDR_DIRECTION_2_UPPER_BYTE : integer := 27;
REG_ADDR_DIRECTION_1_UPPER_BYTE : integer := 28; REG_ADDR_DIRECTION_1_LOWER_BYTE : integer := 28;
REG_ADDR_DIRECTION_1_LOWER_BYTE : integer := 29; REG_ADDR_DIRECTION_1_UPPER_BYTE : integer := 29;
REG_ADDR_CHANNEL_UPPER_BYTE : integer := 30; REG_ADDR_CHANNEL_LOWER_BYTE : integer := 30;
REG_ADDR_CHANNEL_LOWER_BYTE : integer := 31; REG_ADDR_CHANNEL_UPPER_BYTE : integer := 31;
REG_ADDR_TIMING_UPPER_BYTE : integer := 32; REG_ADDR_TIMING_LOWER_BYTE : integer := 32;
REG_ADDR_TIMING_LOWER_BYTE : integer := 33; REG_ADDR_TIMING_UPPER_BYTE : integer := 33;
REG_ADDR_CMD_UPPER_BYTE : integer := 34; REG_ADDR_CMD_LOWER_BYTE : integer := 34;
REG_ADDR_CMD_LOWER_BYTE : integer := 35; REG_ADDR_CMD_UPPER_BYTE : integer := 35;
REG_ADDR_CONTROL_UPPER_BYTE : integer := 36; REG_ADDR_CONTROL_LOWER_BYTE : integer := 36;
REG_ADDR_CONTROL_LOWER_BYTE : integer := 37; REG_ADDR_CONTROL_UPPER_BYTE : integer := 37;
DATA_BUS_WIDTH : integer := 8; DATA_BUS_WIDTH : integer := 8;
ADDRESS_BUS_WIDTH : integer := 9 ADDRESS_BUS_WIDTH : integer := 9
@ -144,7 +144,7 @@ begin
data <= (others => 'Z'); -- Запретить запись на шину data <= (others => 'Z'); -- Запретить запись на шину
end case; end case;
if addr /= REG_ADDR_CONTROL_UPPER_BYTE then if addr /= REG_ADDR_CONTROL_LOWER_BYTE then
enableWriteControlBuf <= '1'; enableWriteControlBuf <= '1';
else else
enableWriteControlBuf <= '0'; enableWriteControlBuf <= '0';

View File

@ -101,42 +101,42 @@ applicable agreement for further details.
(line (pt 328 96)(pt 312 96)(line_width 3)) (line (pt 328 96)(pt 312 96)(line_width 3))
) )
(parameter (parameter
"REG_ADDR_FIRST_FREE_UPPER_BYTE" "REG_ADDR_FIRST_FREE_LOWER_BYTE"
"6" "6"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_FIRST_FREE_LOWER_BYTE" "REG_ADDR_FIRST_FREE_UPPER_BYTE"
"7" "7"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_CMD_UPPER_BYTE" "REG_ADDR_CMD_LOWER_BYTE"
"8" "8"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_CMD_LOWER_BYTE" "REG_ADDR_CMD_UPPER_BYTE"
"9" "9"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_FILL_ADDRESS_SPACE_UPPER_BYTE" "REG_ADDR_FILL_ADDRESS_SPACE_LOWER_BYTE"
"10" "10"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_FILL_ADDRESS_SPACE_LOWER_BYTE" "REG_ADDR_FILL_ADDRESS_SPACE_UPPER_BYTE"
"11" "11"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_CONTROL_UPPER_BYTE" "REG_ADDR_CONTROL_LOWER_BYTE"
"12" "12"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_CONTROL_LOWER_BYTE" "REG_ADDR_CONTROL_UPPER_BYTE"
"13" "13"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )

View File

@ -5,14 +5,14 @@ use ieee.std_logic_unsigned.all;
entity RAM9X8_ParallelBusMaster is entity RAM9X8_ParallelBusMaster is
generic( generic(
REG_ADDR_FIRST_FREE_UPPER_BYTE : integer := 6; REG_ADDR_FIRST_FREE_LOWER_BYTE : integer := 6;
REG_ADDR_FIRST_FREE_LOWER_BYTE : integer := 7; REG_ADDR_FIRST_FREE_UPPER_BYTE : integer := 7;
REG_ADDR_CMD_UPPER_BYTE : integer := 8; REG_ADDR_CMD_LOWER_BYTE : integer := 8;
REG_ADDR_CMD_LOWER_BYTE : integer := 9; REG_ADDR_CMD_UPPER_BYTE : integer := 9;
REG_ADDR_FILL_ADDRESS_SPACE_UPPER_BYTE : integer := 10; REG_ADDR_FILL_ADDRESS_SPACE_LOWER_BYTE : integer := 10;
REG_ADDR_FILL_ADDRESS_SPACE_LOWER_BYTE : integer := 11; REG_ADDR_FILL_ADDRESS_SPACE_UPPER_BYTE : integer := 11;
REG_ADDR_CONTROL_UPPER_BYTE : integer := 12; REG_ADDR_CONTROL_LOWER_BYTE : integer := 12;
REG_ADDR_CONTROL_LOWER_BYTE : integer := 13; REG_ADDR_CONTROL_UPPER_BYTE : integer := 13;
ARRAY_LENGTH : integer := 256; ARRAY_LENGTH : integer := 256;
DATA_BUS_WIDTH : integer := 8; DATA_BUS_WIDTH : integer := 8;

View File

@ -87,32 +87,32 @@ applicable agreement for further details.
(line (pt 328 32)(pt 312 32)(line_width 3)) (line (pt 328 32)(pt 312 32)(line_width 3))
) )
(parameter (parameter
"REG_ADDR_DATA_UPPER_BYTE" "REG_ADDR_DATA_LOWER_BYTE"
"0" "0"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_DATA_LOWER_BYTE" "REG_ADDR_DATA_UPPER_BYTE"
"1" "1"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_CMD_UPPER_BYTE" "REG_ADDR_CMD_LOWER_BYTE"
"2" "2"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_CMD_LOWER_BYTE" "REG_ADDR_CMD_UPPER_BYTE"
"3" "3"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_CONTROL_UPPER_BYTE" "REG_ADDR_CONTROL_LOWER_BYTE"
"4" "4"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )
(parameter (parameter
"REG_ADDR_CONTROL_LOWER_BYTE" "REG_ADDR_CONTROL_UPPER_BYTE"
"5" "5"
"" ""
(type "PARAMETER_SIGNED_DEC") ) (type "PARAMETER_SIGNED_DEC") )

View File

@ -5,12 +5,12 @@ use ieee.std_logic_unsigned.all;
entity RAM9X8_SerialBusMaster is entity RAM9X8_SerialBusMaster is
generic( generic(
REG_ADDR_DATA_UPPER_BYTE : integer := 0; REG_ADDR_DATA_LOWER_BYTE : integer := 0;
REG_ADDR_DATA_LOWER_BYTE : integer := 1; REG_ADDR_DATA_UPPER_BYTE : integer := 1;
REG_ADDR_CMD_UPPER_BYTE : integer := 2; REG_ADDR_CMD_LOWER_BYTE : integer := 2;
REG_ADDR_CMD_LOWER_BYTE : integer := 3; REG_ADDR_CMD_UPPER_BYTE : integer := 3;
REG_ADDR_CONTROL_UPPER_BYTE : integer := 4; REG_ADDR_CONTROL_LOWER_BYTE : integer := 4;
REG_ADDR_CONTROL_LOWER_BYTE : integer := 5; REG_ADDR_CONTROL_UPPER_BYTE : integer := 5;
DATA_BUS_WIDTH : integer := 8; DATA_BUS_WIDTH : integer := 8;
ADDRESS_BUS_WIDTH : integer := 9 ADDRESS_BUS_WIDTH : integer := 9
@ -77,6 +77,7 @@ begin
data <= cmdBuf(7 downto 0); data <= cmdBuf(7 downto 0);
when REG_ADDR_CONTROL_UPPER_BYTE => when REG_ADDR_CONTROL_UPPER_BYTE =>
data <= controlBuf(15 downto 8); data <= controlBuf(15 downto 8);
start <= '0';
when REG_ADDR_CONTROL_LOWER_BYTE => when REG_ADDR_CONTROL_LOWER_BYTE =>
data <= controlBuf(7 downto 0); data <= controlBuf(7 downto 0);
when others => when others =>
@ -90,9 +91,9 @@ begin
dataBufIn(7 downto 0) <= data; dataBufIn(7 downto 0) <= data;
when REG_ADDR_CMD_UPPER_BYTE => when REG_ADDR_CMD_UPPER_BYTE =>
cmdBuf(15 downto 8) <= data; cmdBuf(15 downto 8) <= data;
start <= '1';
when REG_ADDR_CMD_LOWER_BYTE => when REG_ADDR_CMD_LOWER_BYTE =>
cmdBuf(7 downto 0) <= data; cmdBuf(7 downto 0) <= data;
start <= '1';
when others => when others =>
data <= (others => 'Z'); -- Запретить запись на шину data <= (others => 'Z'); -- Запретить запись на шину
end case; end case;