Изменили все LOWER и UPPER адреса в словах так как контроллер передает сначала младший байт потом старший.
This commit is contained in:
parent
d5abda1db4
commit
a9a45aaad4
File diff suppressed because it is too large
Load Diff
@ -87,42 +87,42 @@ applicable agreement for further details.
|
||||
(line (pt 328 32)(pt 312 32)(line_width 3))
|
||||
)
|
||||
(parameter
|
||||
"REG_ADDR_CMD_2_UPPER_BYTE"
|
||||
"REG_ADDR_CMD_2_LOWER_BYTE"
|
||||
"46"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_CMD_2_LOWER_BYTE"
|
||||
"REG_ADDR_CMD_2_UPPER_BYTE"
|
||||
"47"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_CMD_1_UPPER_BYTE"
|
||||
"REG_ADDR_CMD_1_LOWER_BYTE"
|
||||
"48"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_CMD_1_LOWER_BYTE"
|
||||
"REG_ADDR_CMD_1_UPPER_BYTE"
|
||||
"49"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_DATA_2_UPPER_BYTE"
|
||||
"REG_ADDR_DATA_2_LOWER_BYTE"
|
||||
"50"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_DATA_2_LOWER_BYTE"
|
||||
"REG_ADDR_DATA_2_UPPER_BYTE"
|
||||
"51"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_DATA_1_UPPER_BYTE"
|
||||
"REG_ADDR_DATA_1_LOWER_BYTE"
|
||||
"52"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_DATA_1_LOWER_BYTE"
|
||||
"REG_ADDR_DATA_1_UPPER_BYTE"
|
||||
"53"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
|
@ -5,14 +5,14 @@ use ieee.std_logic_unsigned.all;
|
||||
|
||||
entity RAM9X8_HWPBusMaster is
|
||||
generic(
|
||||
REG_ADDR_CMD_2_UPPER_BYTE : integer := 46;
|
||||
REG_ADDR_CMD_2_LOWER_BYTE : integer := 47;
|
||||
REG_ADDR_CMD_1_UPPER_BYTE : integer := 48;
|
||||
REG_ADDR_CMD_1_LOWER_BYTE : integer := 49;
|
||||
REG_ADDR_DATA_2_UPPER_BYTE : integer := 50;
|
||||
REG_ADDR_DATA_2_LOWER_BYTE : integer := 51;
|
||||
REG_ADDR_DATA_1_UPPER_BYTE : integer := 52;
|
||||
REG_ADDR_DATA_1_LOWER_BYTE : integer := 53;
|
||||
REG_ADDR_CMD_2_LOWER_BYTE : integer := 46;
|
||||
REG_ADDR_CMD_2_UPPER_BYTE : integer := 47;
|
||||
REG_ADDR_CMD_1_LOWER_BYTE : integer := 48;
|
||||
REG_ADDR_CMD_1_UPPER_BYTE : integer := 49;
|
||||
REG_ADDR_DATA_2_LOWER_BYTE : integer := 50;
|
||||
REG_ADDR_DATA_2_UPPER_BYTE : integer := 51;
|
||||
REG_ADDR_DATA_1_LOWER_BYTE : integer := 52;
|
||||
REG_ADDR_DATA_1_UPPER_BYTE : integer := 53;
|
||||
|
||||
DATA_BUS_WIDTH : integer := 8;
|
||||
ADDRESS_BUS_WIDTH : integer := 9
|
||||
|
@ -94,32 +94,32 @@ applicable agreement for further details.
|
||||
(line (pt 328 32)(pt 312 32)(line_width 3))
|
||||
)
|
||||
(parameter
|
||||
"REG_ADDR_ACTIVE_DEVICE_UPPER_BYTE"
|
||||
"REG_ADDR_ACTIVE_DEVICE_LOWER_BYTE"
|
||||
"38"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_ACTIVE_DEVICE_LOWER_BYTE"
|
||||
"REG_ADDR_ACTIVE_DEVICE_UPPER_BYTE"
|
||||
"39"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_TEST_UPPER_BYTE"
|
||||
"REG_ADDR_TEST_LOWER_BYTE"
|
||||
"40"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_TEST_LOWER_BYTE"
|
||||
"REG_ADDR_TEST_UPPER_BYTE"
|
||||
"41"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_VERSION_UPPER_BYTE"
|
||||
"REG_ADDR_VERSION_LOWER_BYTE"
|
||||
"42"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_VERSION_LOWER_BYTE"
|
||||
"REG_ADDR_VERSION_UPPER_BYTE"
|
||||
"43"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
|
@ -5,12 +5,12 @@ use ieee.std_logic_unsigned.all;
|
||||
|
||||
entity RAM9X8_LedController is
|
||||
generic(
|
||||
REG_ADDR_ACTIVE_DEVICE_UPPER_BYTE : integer := 38;
|
||||
REG_ADDR_ACTIVE_DEVICE_LOWER_BYTE : integer := 39;
|
||||
REG_ADDR_TEST_UPPER_BYTE : integer := 40;
|
||||
REG_ADDR_TEST_LOWER_BYTE : integer := 41;
|
||||
REG_ADDR_VERSION_UPPER_BYTE : integer := 42;
|
||||
REG_ADDR_VERSION_LOWER_BYTE : integer := 43;
|
||||
REG_ADDR_ACTIVE_DEVICE_LOWER_BYTE : integer := 38;
|
||||
REG_ADDR_ACTIVE_DEVICE_UPPER_BYTE : integer := 39;
|
||||
REG_ADDR_TEST_LOWER_BYTE : integer := 40;
|
||||
REG_ADDR_TEST_UPPER_BYTE : integer := 41;
|
||||
REG_ADDR_VERSION_LOWER_BYTE : integer := 42;
|
||||
REG_ADDR_VERSION_UPPER_BYTE : integer := 43;
|
||||
|
||||
DATA_BUS_WIDTH : integer := 8;
|
||||
ADDRESS_BUS_WIDTH : integer := 9
|
||||
@ -61,7 +61,8 @@ begin
|
||||
if (ce = '0') then -- Если микросхема выбрана
|
||||
addr := conv_integer(address);
|
||||
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 -- Если сигнал чтения активен, а записи нет
|
||||
case addr is
|
||||
when REG_ADDR_ACTIVE_DEVICE_UPPER_BYTE =>
|
||||
|
@ -143,12 +143,12 @@ applicable agreement for further details.
|
||||
(line (pt 328 32)(pt 312 32)(line_width 3))
|
||||
)
|
||||
(parameter
|
||||
"REG_ADDR_LOADER_UPPER_BYTE"
|
||||
"REG_ADDR_LOADER_LOWER_BYTE"
|
||||
"44"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_LOADER_LOWER_BYTE"
|
||||
"REG_ADDR_LOADER_UPPER_BYTE"
|
||||
"45"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
|
@ -5,8 +5,8 @@ use ieee.std_logic_unsigned.all;
|
||||
|
||||
entity RAM9X8_Loader is
|
||||
generic(
|
||||
REG_ADDR_LOADER_UPPER_BYTE : integer := 44;
|
||||
REG_ADDR_LOADER_LOWER_BYTE : integer := 45;
|
||||
REG_ADDR_LOADER_LOWER_BYTE : integer := 44;
|
||||
REG_ADDR_LOADER_UPPER_BYTE : integer := 45;
|
||||
|
||||
DATA_BUS_WIDTH : integer := 8;
|
||||
ADDRESS_BUS_WIDTH : integer := 9
|
||||
|
@ -80,92 +80,92 @@ applicable agreement for further details.
|
||||
(line (pt 328 32)(pt 312 32)(line_width 3))
|
||||
)
|
||||
(parameter
|
||||
"REG_ADDR_CMD_UPPER_BYTE"
|
||||
"REG_ADDR_CMD_LOWER_BYTE"
|
||||
"54"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_CMD_LOWER_BYTE"
|
||||
"REG_ADDR_CMD_UPPER_BYTE"
|
||||
"55"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_WORD_8_UPPER_BYTE"
|
||||
"REG_ADDR_WORD_8_LOWER_BYTE"
|
||||
"56"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_WORD_8_LOWER_BYTE"
|
||||
"REG_ADDR_WORD_8_UPPER_BYTE"
|
||||
"57"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_WORD_7_UPPER_BYTE"
|
||||
"REG_ADDR_WORD_7_LOWER_BYTE"
|
||||
"58"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_WORD_7_LOWER_BYTE"
|
||||
"REG_ADDR_WORD_7_UPPER_BYTE"
|
||||
"59"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_WORD_6_UPPER_BYTE"
|
||||
"REG_ADDR_WORD_6_LOWER_BYTE"
|
||||
"60"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_WORD_6_LOWER_BYTE"
|
||||
"REG_ADDR_WORD_6_UPPER_BYTE"
|
||||
"61"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_WORD_5_UPPER_BYTE"
|
||||
"REG_ADDR_WORD_5_LOWER_BYTE"
|
||||
"62"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_WORD_5_LOWER_BYTE"
|
||||
"REG_ADDR_WORD_5_UPPER_BYTE"
|
||||
"63"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_WORD_4_UPPER_BYTE"
|
||||
"REG_ADDR_WORD_4_LOWER_BYTE"
|
||||
"64"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_WORD_4_LOWER_BYTE"
|
||||
"REG_ADDR_WORD_4_UPPER_BYTE"
|
||||
"65"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_WORD_3_UPPER_BYTE"
|
||||
"REG_ADDR_WORD_3_LOWER_BYTE"
|
||||
"66"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_WORD_3_LOWER_BYTE"
|
||||
"REG_ADDR_WORD_3_UPPER_BYTE"
|
||||
"67"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_WORD_2_UPPER_BYTE"
|
||||
"REG_ADDR_WORD_2_LOWER_BYTE"
|
||||
"68"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_WORD_2_LOWER_BYTE"
|
||||
"REG_ADDR_WORD_2_UPPER_BYTE"
|
||||
"69"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_WORD_1_UPPER_BYTE"
|
||||
"REG_ADDR_WORD_1_LOWER_BYTE"
|
||||
"70"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_WORD_1_LOWER_BYTE"
|
||||
"REG_ADDR_WORD_1_UPPER_BYTE"
|
||||
"71"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
|
@ -5,24 +5,24 @@ use ieee.std_logic_unsigned.all;
|
||||
|
||||
entity RAM9X8_OpticalBusMaster is
|
||||
generic(
|
||||
REG_ADDR_CMD_UPPER_BYTE : integer := 54;
|
||||
REG_ADDR_CMD_LOWER_BYTE : integer := 55;
|
||||
REG_ADDR_WORD_8_UPPER_BYTE : integer := 56;
|
||||
REG_ADDR_WORD_8_LOWER_BYTE : integer := 57;
|
||||
REG_ADDR_WORD_7_UPPER_BYTE : integer := 58;
|
||||
REG_ADDR_WORD_7_LOWER_BYTE : integer := 59;
|
||||
REG_ADDR_WORD_6_UPPER_BYTE : integer := 60;
|
||||
REG_ADDR_WORD_6_LOWER_BYTE : integer := 61;
|
||||
REG_ADDR_WORD_5_UPPER_BYTE : integer := 62;
|
||||
REG_ADDR_WORD_5_LOWER_BYTE : integer := 63;
|
||||
REG_ADDR_WORD_4_UPPER_BYTE : integer := 64;
|
||||
REG_ADDR_WORD_4_LOWER_BYTE : integer := 65;
|
||||
REG_ADDR_WORD_3_UPPER_BYTE : integer := 66;
|
||||
REG_ADDR_WORD_3_LOWER_BYTE : integer := 67;
|
||||
REG_ADDR_WORD_2_UPPER_BYTE : integer := 68;
|
||||
REG_ADDR_WORD_2_LOWER_BYTE : integer := 69;
|
||||
REG_ADDR_WORD_1_UPPER_BYTE : integer := 70;
|
||||
REG_ADDR_WORD_1_LOWER_BYTE : integer := 71;
|
||||
REG_ADDR_CMD_LOWER_BYTE : integer := 54;
|
||||
REG_ADDR_CMD_UPPER_BYTE : integer := 55;
|
||||
REG_ADDR_WORD_8_LOWER_BYTE : integer := 56;
|
||||
REG_ADDR_WORD_8_UPPER_BYTE : integer := 57;
|
||||
REG_ADDR_WORD_7_LOWER_BYTE : integer := 58;
|
||||
REG_ADDR_WORD_7_UPPER_BYTE : integer := 59;
|
||||
REG_ADDR_WORD_6_LOWER_BYTE : integer := 60;
|
||||
REG_ADDR_WORD_6_UPPER_BYTE : integer := 61;
|
||||
REG_ADDR_WORD_5_LOWER_BYTE : integer := 62;
|
||||
REG_ADDR_WORD_5_UPPER_BYTE : integer := 63;
|
||||
REG_ADDR_WORD_4_LOWER_BYTE : integer := 64;
|
||||
REG_ADDR_WORD_4_UPPER_BYTE : integer := 65;
|
||||
REG_ADDR_WORD_3_LOWER_BYTE : integer := 66;
|
||||
REG_ADDR_WORD_3_UPPER_BYTE : integer := 67;
|
||||
REG_ADDR_WORD_2_LOWER_BYTE : integer := 68;
|
||||
REG_ADDR_WORD_2_UPPER_BYTE : integer := 69;
|
||||
REG_ADDR_WORD_1_LOWER_BYTE : integer := 70;
|
||||
REG_ADDR_WORD_1_UPPER_BYTE : integer := 71;
|
||||
|
||||
DATA_BUS_WIDTH : integer := 8;
|
||||
ADDRESS_BUS_WIDTH : integer := 9
|
||||
@ -159,7 +159,7 @@ begin
|
||||
when others =>
|
||||
data <= (others => 'Z'); -- Запретить запись на шину
|
||||
end case;
|
||||
if (addr = REG_ADDR_WORD_1_LOWER_BYTE) then
|
||||
if (addr = REG_ADDR_WORD_1_UPPER_BYTE) then
|
||||
start <= '1';
|
||||
else
|
||||
start <= '0';
|
||||
|
@ -94,122 +94,122 @@ applicable agreement for further details.
|
||||
(line (pt 328 32)(pt 312 32)(line_width 3))
|
||||
)
|
||||
(parameter
|
||||
"REG_ADDR_MODE_CONTROL_UPPER_BYTE"
|
||||
"REG_ADDR_MODE_CONTROL_LOWER_BYTE"
|
||||
"14"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_MODE_CONTROL_LOWER_BYTE"
|
||||
"REG_ADDR_MODE_CONTROL_UPPER_BYTE"
|
||||
"15"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_MASK_2_UPPER_BYTE"
|
||||
"REG_ADDR_MASK_2_LOWER_BYTE"
|
||||
"16"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_MASK_2_LOWER_BYTE"
|
||||
"REG_ADDR_MASK_2_UPPER_BYTE"
|
||||
"17"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_MASK_1_UPPER_BYTE"
|
||||
"REG_ADDR_MASK_1_LOWER_BYTE"
|
||||
"18"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_MASK_1_LOWER_BYTE"
|
||||
"REG_ADDR_MASK_1_UPPER_BYTE"
|
||||
"19"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_DIRECT_CONTROL_2_UPPER_BYTE"
|
||||
"REG_ADDR_DIRECT_CONTROL_2_LOWER_BYTE"
|
||||
"20"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_DIRECT_CONTROL_2_LOWER_BYTE"
|
||||
"REG_ADDR_DIRECT_CONTROL_2_UPPER_BYTE"
|
||||
"21"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_DIRECT_CONTROL_1_UPPER_BYTE"
|
||||
"REG_ADDR_DIRECT_CONTROL_1_LOWER_BYTE"
|
||||
"22"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_DIRECT_CONTROL_1_LOWER_BYTE"
|
||||
"REG_ADDR_DIRECT_CONTROL_1_UPPER_BYTE"
|
||||
"23"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_PERIOD_UPPER_BYTE"
|
||||
"REG_ADDR_PERIOD_LOWER_BYTE"
|
||||
"24"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_PERIOD_LOWER_BYTE"
|
||||
"REG_ADDR_PERIOD_UPPER_BYTE"
|
||||
"25"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_DIRECTION_2_UPPER_BYTE"
|
||||
"REG_ADDR_DIRECTION_2_LOWER_BYTE"
|
||||
"26"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_DIRECTION_2_LOWER_BYTE"
|
||||
"REG_ADDR_DIRECTION_2_UPPER_BYTE"
|
||||
"27"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_DIRECTION_1_UPPER_BYTE"
|
||||
"REG_ADDR_DIRECTION_1_LOWER_BYTE"
|
||||
"28"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_DIRECTION_1_LOWER_BYTE"
|
||||
"REG_ADDR_DIRECTION_1_UPPER_BYTE"
|
||||
"29"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_CHANNEL_UPPER_BYTE"
|
||||
"REG_ADDR_CHANNEL_LOWER_BYTE"
|
||||
"30"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_CHANNEL_LOWER_BYTE"
|
||||
"REG_ADDR_CHANNEL_UPPER_BYTE"
|
||||
"31"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_TIMING_UPPER_BYTE"
|
||||
"REG_ADDR_TIMING_LOWER_BYTE"
|
||||
"32"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_TIMING_LOWER_BYTE"
|
||||
"REG_ADDR_TIMING_UPPER_BYTE"
|
||||
"33"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_CMD_UPPER_BYTE"
|
||||
"REG_ADDR_CMD_LOWER_BYTE"
|
||||
"34"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_CMD_LOWER_BYTE"
|
||||
"REG_ADDR_CMD_UPPER_BYTE"
|
||||
"35"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_CONTROL_UPPER_BYTE"
|
||||
"REG_ADDR_CONTROL_LOWER_BYTE"
|
||||
"36"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_CONTROL_LOWER_BYTE"
|
||||
"REG_ADDR_CONTROL_UPPER_BYTE"
|
||||
"37"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
|
@ -5,30 +5,30 @@ use ieee.std_logic_unsigned.all;
|
||||
|
||||
entity RAM9X8_PWM is
|
||||
generic(
|
||||
REG_ADDR_MODE_CONTROL_UPPER_BYTE : integer := 14;
|
||||
REG_ADDR_MODE_CONTROL_LOWER_BYTE : integer := 15;
|
||||
REG_ADDR_MASK_2_UPPER_BYTE : integer := 16;
|
||||
REG_ADDR_MASK_2_LOWER_BYTE : integer := 17;
|
||||
REG_ADDR_MASK_1_UPPER_BYTE : integer := 18;
|
||||
REG_ADDR_MASK_1_LOWER_BYTE : integer := 19;
|
||||
REG_ADDR_DIRECT_CONTROL_2_UPPER_BYTE : integer := 20;
|
||||
REG_ADDR_DIRECT_CONTROL_2_LOWER_BYTE : integer := 21;
|
||||
REG_ADDR_DIRECT_CONTROL_1_UPPER_BYTE : integer := 22;
|
||||
REG_ADDR_DIRECT_CONTROL_1_LOWER_BYTE : integer := 23;
|
||||
REG_ADDR_PERIOD_UPPER_BYTE : integer := 24;
|
||||
REG_ADDR_PERIOD_LOWER_BYTE : integer := 25;
|
||||
REG_ADDR_DIRECTION_2_UPPER_BYTE : integer := 26;
|
||||
REG_ADDR_DIRECTION_2_LOWER_BYTE : integer := 27;
|
||||
REG_ADDR_DIRECTION_1_UPPER_BYTE : integer := 28;
|
||||
REG_ADDR_DIRECTION_1_LOWER_BYTE : integer := 29;
|
||||
REG_ADDR_CHANNEL_UPPER_BYTE : integer := 30;
|
||||
REG_ADDR_CHANNEL_LOWER_BYTE : integer := 31;
|
||||
REG_ADDR_TIMING_UPPER_BYTE : integer := 32;
|
||||
REG_ADDR_TIMING_LOWER_BYTE : integer := 33;
|
||||
REG_ADDR_CMD_UPPER_BYTE : integer := 34;
|
||||
REG_ADDR_CMD_LOWER_BYTE : integer := 35;
|
||||
REG_ADDR_CONTROL_UPPER_BYTE : integer := 36;
|
||||
REG_ADDR_CONTROL_LOWER_BYTE : integer := 37;
|
||||
REG_ADDR_MODE_CONTROL_LOWER_BYTE : integer := 14;
|
||||
REG_ADDR_MODE_CONTROL_UPPER_BYTE : integer := 15;
|
||||
REG_ADDR_MASK_2_LOWER_BYTE : integer := 16;
|
||||
REG_ADDR_MASK_2_UPPER_BYTE : integer := 17;
|
||||
REG_ADDR_MASK_1_LOWER_BYTE : integer := 18;
|
||||
REG_ADDR_MASK_1_UPPER_BYTE : integer := 19;
|
||||
REG_ADDR_DIRECT_CONTROL_2_LOWER_BYTE : integer := 20;
|
||||
REG_ADDR_DIRECT_CONTROL_2_UPPER_BYTE : integer := 21;
|
||||
REG_ADDR_DIRECT_CONTROL_1_LOWER_BYTE : integer := 22;
|
||||
REG_ADDR_DIRECT_CONTROL_1_UPPER_BYTE : integer := 23;
|
||||
REG_ADDR_PERIOD_LOWER_BYTE : integer := 24;
|
||||
REG_ADDR_PERIOD_UPPER_BYTE : integer := 25;
|
||||
REG_ADDR_DIRECTION_2_LOWER_BYTE : integer := 26;
|
||||
REG_ADDR_DIRECTION_2_UPPER_BYTE : integer := 27;
|
||||
REG_ADDR_DIRECTION_1_LOWER_BYTE : integer := 28;
|
||||
REG_ADDR_DIRECTION_1_UPPER_BYTE : integer := 29;
|
||||
REG_ADDR_CHANNEL_LOWER_BYTE : integer := 30;
|
||||
REG_ADDR_CHANNEL_UPPER_BYTE : integer := 31;
|
||||
REG_ADDR_TIMING_LOWER_BYTE : integer := 32;
|
||||
REG_ADDR_TIMING_UPPER_BYTE : integer := 33;
|
||||
REG_ADDR_CMD_LOWER_BYTE : integer := 34;
|
||||
REG_ADDR_CMD_UPPER_BYTE : integer := 35;
|
||||
REG_ADDR_CONTROL_LOWER_BYTE : integer := 36;
|
||||
REG_ADDR_CONTROL_UPPER_BYTE : integer := 37;
|
||||
|
||||
DATA_BUS_WIDTH : integer := 8;
|
||||
ADDRESS_BUS_WIDTH : integer := 9
|
||||
@ -144,7 +144,7 @@ begin
|
||||
data <= (others => 'Z'); -- Запретить запись на шину
|
||||
end case;
|
||||
|
||||
if addr /= REG_ADDR_CONTROL_UPPER_BYTE then
|
||||
if addr /= REG_ADDR_CONTROL_LOWER_BYTE then
|
||||
enableWriteControlBuf <= '1';
|
||||
else
|
||||
enableWriteControlBuf <= '0';
|
||||
|
@ -101,42 +101,42 @@ applicable agreement for further details.
|
||||
(line (pt 328 96)(pt 312 96)(line_width 3))
|
||||
)
|
||||
(parameter
|
||||
"REG_ADDR_FIRST_FREE_UPPER_BYTE"
|
||||
"REG_ADDR_FIRST_FREE_LOWER_BYTE"
|
||||
"6"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_FIRST_FREE_LOWER_BYTE"
|
||||
"REG_ADDR_FIRST_FREE_UPPER_BYTE"
|
||||
"7"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_CMD_UPPER_BYTE"
|
||||
"REG_ADDR_CMD_LOWER_BYTE"
|
||||
"8"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_CMD_LOWER_BYTE"
|
||||
"REG_ADDR_CMD_UPPER_BYTE"
|
||||
"9"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_FILL_ADDRESS_SPACE_UPPER_BYTE"
|
||||
"REG_ADDR_FILL_ADDRESS_SPACE_LOWER_BYTE"
|
||||
"10"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_FILL_ADDRESS_SPACE_LOWER_BYTE"
|
||||
"REG_ADDR_FILL_ADDRESS_SPACE_UPPER_BYTE"
|
||||
"11"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_CONTROL_UPPER_BYTE"
|
||||
"REG_ADDR_CONTROL_LOWER_BYTE"
|
||||
"12"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_CONTROL_LOWER_BYTE"
|
||||
"REG_ADDR_CONTROL_UPPER_BYTE"
|
||||
"13"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
|
@ -5,14 +5,14 @@ use ieee.std_logic_unsigned.all;
|
||||
|
||||
entity RAM9X8_ParallelBusMaster is
|
||||
generic(
|
||||
REG_ADDR_FIRST_FREE_UPPER_BYTE : integer := 6;
|
||||
REG_ADDR_FIRST_FREE_LOWER_BYTE : integer := 7;
|
||||
REG_ADDR_CMD_UPPER_BYTE : integer := 8;
|
||||
REG_ADDR_CMD_LOWER_BYTE : integer := 9;
|
||||
REG_ADDR_FILL_ADDRESS_SPACE_UPPER_BYTE : integer := 10;
|
||||
REG_ADDR_FILL_ADDRESS_SPACE_LOWER_BYTE : integer := 11;
|
||||
REG_ADDR_CONTROL_UPPER_BYTE : integer := 12;
|
||||
REG_ADDR_CONTROL_LOWER_BYTE : integer := 13;
|
||||
REG_ADDR_FIRST_FREE_LOWER_BYTE : integer := 6;
|
||||
REG_ADDR_FIRST_FREE_UPPER_BYTE : integer := 7;
|
||||
REG_ADDR_CMD_LOWER_BYTE : integer := 8;
|
||||
REG_ADDR_CMD_UPPER_BYTE : integer := 9;
|
||||
REG_ADDR_FILL_ADDRESS_SPACE_LOWER_BYTE : integer := 10;
|
||||
REG_ADDR_FILL_ADDRESS_SPACE_UPPER_BYTE : integer := 11;
|
||||
REG_ADDR_CONTROL_LOWER_BYTE : integer := 12;
|
||||
REG_ADDR_CONTROL_UPPER_BYTE : integer := 13;
|
||||
|
||||
ARRAY_LENGTH : integer := 256;
|
||||
DATA_BUS_WIDTH : integer := 8;
|
||||
|
@ -87,32 +87,32 @@ applicable agreement for further details.
|
||||
(line (pt 328 32)(pt 312 32)(line_width 3))
|
||||
)
|
||||
(parameter
|
||||
"REG_ADDR_DATA_UPPER_BYTE"
|
||||
"REG_ADDR_DATA_LOWER_BYTE"
|
||||
"0"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_DATA_LOWER_BYTE"
|
||||
"REG_ADDR_DATA_UPPER_BYTE"
|
||||
"1"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_CMD_UPPER_BYTE"
|
||||
"REG_ADDR_CMD_LOWER_BYTE"
|
||||
"2"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_CMD_LOWER_BYTE"
|
||||
"REG_ADDR_CMD_UPPER_BYTE"
|
||||
"3"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_CONTROL_UPPER_BYTE"
|
||||
"REG_ADDR_CONTROL_LOWER_BYTE"
|
||||
"4"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
(parameter
|
||||
"REG_ADDR_CONTROL_LOWER_BYTE"
|
||||
"REG_ADDR_CONTROL_UPPER_BYTE"
|
||||
"5"
|
||||
""
|
||||
(type "PARAMETER_SIGNED_DEC") )
|
||||
|
@ -5,12 +5,12 @@ use ieee.std_logic_unsigned.all;
|
||||
|
||||
entity RAM9X8_SerialBusMaster is
|
||||
generic(
|
||||
REG_ADDR_DATA_UPPER_BYTE : integer := 0;
|
||||
REG_ADDR_DATA_LOWER_BYTE : integer := 1;
|
||||
REG_ADDR_CMD_UPPER_BYTE : integer := 2;
|
||||
REG_ADDR_CMD_LOWER_BYTE : integer := 3;
|
||||
REG_ADDR_CONTROL_UPPER_BYTE : integer := 4;
|
||||
REG_ADDR_CONTROL_LOWER_BYTE : integer := 5;
|
||||
REG_ADDR_DATA_LOWER_BYTE : integer := 0;
|
||||
REG_ADDR_DATA_UPPER_BYTE : integer := 1;
|
||||
REG_ADDR_CMD_LOWER_BYTE : integer := 2;
|
||||
REG_ADDR_CMD_UPPER_BYTE : integer := 3;
|
||||
REG_ADDR_CONTROL_LOWER_BYTE : integer := 4;
|
||||
REG_ADDR_CONTROL_UPPER_BYTE : integer := 5;
|
||||
|
||||
DATA_BUS_WIDTH : integer := 8;
|
||||
ADDRESS_BUS_WIDTH : integer := 9
|
||||
@ -77,6 +77,7 @@ begin
|
||||
data <= cmdBuf(7 downto 0);
|
||||
when REG_ADDR_CONTROL_UPPER_BYTE =>
|
||||
data <= controlBuf(15 downto 8);
|
||||
start <= '0';
|
||||
when REG_ADDR_CONTROL_LOWER_BYTE =>
|
||||
data <= controlBuf(7 downto 0);
|
||||
when others =>
|
||||
@ -90,9 +91,9 @@ begin
|
||||
dataBufIn(7 downto 0) <= data;
|
||||
when REG_ADDR_CMD_UPPER_BYTE =>
|
||||
cmdBuf(15 downto 8) <= data;
|
||||
start <= '1';
|
||||
when REG_ADDR_CMD_LOWER_BYTE =>
|
||||
cmdBuf(7 downto 0) <= data;
|
||||
start <= '1';
|
||||
when others =>
|
||||
data <= (others => 'Z'); -- Запретить запись на шину
|
||||
end case;
|
||||
|
Loading…
Reference in New Issue
Block a user