diff --git a/MainController/MainController.bdf b/MainController/MainController.bdf index d4c4c51..da69a11 100644 --- a/MainController/MainController.bdf +++ b/MainController/MainController.bdf @@ -680,6 +680,7 @@ applicable agreement for further details. (line (pt 82 8)(pt 78 12)) (line (pt 78 12)(pt 82 8)) ) + (annotation_block (location)(rect 2032 1936 2080 1952)) ) (pin (output) @@ -696,6 +697,7 @@ applicable agreement for further details. (line (pt 82 8)(pt 78 12)) (line (pt 78 12)(pt 82 8)) ) + (annotation_block (location)(rect 2032 1952 2080 1968)) ) (pin (bidir) @@ -927,147 +929,6 @@ applicable agreement for further details. ) (annotation_block (parameter)(rect 1040 416 1360 544)) ) -(symbol - (rect 1040 864 1368 1008) - (text "RAM9X8_ParallelBusMaster" (rect 5 0 139 12)(font "Arial" )) - (text "inst7" (rect 8 128 31 140)(font "Arial" )) - (port - (pt 0 32) - (input) - (text "clk" (rect 0 0 14 12)(font "Arial" )) - (text "clk" (rect 21 27 35 39)(font "Arial" )) - (line (pt 0 32)(pt 16 32)) - ) - (port - (pt 0 48) - (input) - (text "address[address_bus_width-1..0]" (rect 0 0 161 12)(font "Arial" )) - (text "address[address_bus_width-1..0]" (rect 21 43 182 55)(font "Arial" )) - (line (pt 0 48)(pt 16 48)(line_width 3)) - ) - (port - (pt 0 64) - (input) - (text "we" (rect 0 0 12 12)(font "Arial" )) - (text "we" (rect 21 59 33 71)(font "Arial" )) - (line (pt 0 64)(pt 16 64)) - ) - (port - (pt 0 80) - (input) - (text "oe" (rect 0 0 11 12)(font "Arial" )) - (text "oe" (rect 21 75 32 87)(font "Arial" )) - (line (pt 0 80)(pt 16 80)) - ) - (port - (pt 0 96) - (input) - (text "ce" (rect 0 0 11 12)(font "Arial" )) - (text "ce" (rect 21 91 32 103)(font "Arial" )) - (line (pt 0 96)(pt 16 96)) - ) - (port - (pt 0 112) - (input) - (text "pback" (rect 0 0 29 12)(font "Arial" )) - (text "pback" (rect 21 107 50 119)(font "Arial" )) - (line (pt 0 112)(pt 16 112)) - ) - (port - (pt 328 48) - (output) - (text "pbclk" (rect 0 0 25 12)(font "Arial" )) - (text "pbclk" (rect 286 43 311 55)(font "Arial" )) - (line (pt 328 48)(pt 312 48)) - ) - (port - (pt 328 64) - (output) - (text "pbce" (rect 0 0 23 12)(font "Arial" )) - (text "pbce" (rect 288 59 311 71)(font "Arial" )) - (line (pt 328 64)(pt 312 64)) - ) - (port - (pt 328 80) - (output) - (text "pbdir[1..0]" (rect 0 0 49 12)(font "Arial" )) - (text "pbdir[1..0]" (rect 266 75 315 87)(font "Arial" )) - (line (pt 328 80)(pt 312 80)(line_width 3)) - ) - (port - (pt 328 32) - (bidir) - (text "data[data_bus_width-1..0]" (rect 0 0 126 12)(font "Arial" )) - (text "data[data_bus_width-1..0]" (rect 208 27 334 39)(font "Arial" )) - (line (pt 328 32)(pt 312 32)(line_width 3)) - ) - (port - (pt 328 96) - (bidir) - (text "pbdata[15..0]" (rect 0 0 64 12)(font "Arial" )) - (text "pbdata[15..0]" (rect 258 91 322 103)(font "Arial" )) - (line (pt 328 96)(pt 312 96)(line_width 3)) - ) - (parameter - "REG_ADDR_FIRST_FREE_UPPER_BYTE" - "6" - "" - (type "PARAMETER_SIGNED_DEC") ) - (parameter - "REG_ADDR_FIRST_FREE_LOWER_BYTE" - "7" - "" - (type "PARAMETER_SIGNED_DEC") ) - (parameter - "REG_ADDR_CMD_UPPER_BYTE" - "8" - "" - (type "PARAMETER_SIGNED_DEC") ) - (parameter - "REG_ADDR_CMD_LOWER_BYTE" - "9" - "" - (type "PARAMETER_SIGNED_DEC") ) - (parameter - "REG_ADDR_FILL_ADDRESS_SPACE_UPPER_BYTE" - "10" - "" - (type "PARAMETER_SIGNED_DEC") ) - (parameter - "REG_ADDR_FILL_ADDRESS_SPACE_LOWER_BYTE" - "11" - "" - (type "PARAMETER_SIGNED_DEC") ) - (parameter - "REG_ADDR_CONTROL_UPPER_BYTE" - "12" - "" - (type "PARAMETER_SIGNED_DEC") ) - (parameter - "REG_ADDR_CONTROL_LOWER_BYTE" - "13" - "" - (type "PARAMETER_SIGNED_DEC") ) - (parameter - "ARRAY_LENGTH" - "128" - "" - (type "PARAMETER_SIGNED_DEC") ) - (parameter - "DATA_BUS_WIDTH" - "8" - "" - (type "PARAMETER_SIGNED_DEC") ) - (parameter - "ADDRESS_BUS_WIDTH" - "9" - "" - (type "PARAMETER_SIGNED_DEC") ) - (drawing - (rectangle (rect 16 16 312 128)) - ) - (annotation_block (parameter)(rect 1024 696 1408 864)) -) (symbol (rect 1696 88 1728 120) (text "GND" (rect 8 16 29 26)(font "Arial" (font_size 6))) @@ -1599,9 +1460,111 @@ applicable agreement for further details. (annotation_block (parameter)(rect 1024 1016 1400 1400)) ) (symbol - (rect 1040 240 1368 384) - (text "RAM9X8_LedController" (rect 5 0 117 12)(font "Arial" )) - (text "inst19" (rect 8 128 37 140)(font "Arial" )) + (rect 536 320 568 336) + (text "VCC" (rect 7 0 27 10)(font "Arial" (font_size 6))) + (text "inst20" (rect 3 5 32 17)(font "Arial" )(invisible)) + (port + (pt 16 16) + (output) + (text "1" (rect 19 7 24 19)(font "Courier New" (bold))(invisible)) + (text "1" (rect 19 7 24 19)(font "Courier New" (bold))(invisible)) + (line (pt 16 16)(pt 16 8)) + ) + (drawing + (line (pt 8 8)(pt 24 8)) + ) +) +(symbol + (rect 704 -64 800 32) + (text "DigitalFilterBlockSingle" (rect 5 0 130 14)(font "Arial" (font_size 8))) + (text "inst22" (rect 8 80 37 92)(font "Arial" )) + (port + (pt 0 32) + (input) + (text "d" (rect 0 0 7 14)(font "Arial" (font_size 8))) + (text "d" (rect 21 27 28 41)(font "Arial" (font_size 8))) + (line (pt 0 32)(pt 16 32)) + ) + (port + (pt 0 48) + (input) + (text "clk" (rect 0 0 15 14)(font "Arial" (font_size 8))) + (text "clk" (rect 21 43 36 57)(font "Arial" (font_size 8))) + (line (pt 0 48)(pt 16 48)) + ) + (port + (pt 96 32) + (output) + (text "q" (rect 0 0 7 14)(font "Arial" (font_size 8))) + (text "q" (rect 68 27 75 41)(font "Arial" (font_size 8))) + (line (pt 96 32)(pt 80 32)) + ) + (drawing + (rectangle (rect 16 16 80 80)) + ) +) +(symbol + (rect 704 -312 800 -216) + (text "DigitalFilterBlockSingle" (rect 5 0 130 14)(font "Arial" (font_size 8))) + (text "inst25" (rect 8 80 37 92)(font "Arial" )) + (port + (pt 0 32) + (input) + (text "d" (rect 0 0 7 14)(font "Arial" (font_size 8))) + (text "d" (rect 21 27 28 41)(font "Arial" (font_size 8))) + (line (pt 0 32)(pt 16 32)) + ) + (port + (pt 0 48) + (input) + (text "clk" (rect 0 0 15 14)(font "Arial" (font_size 8))) + (text "clk" (rect 21 43 36 57)(font "Arial" (font_size 8))) + (line (pt 0 48)(pt 16 48)) + ) + (port + (pt 96 32) + (output) + (text "q" (rect 0 0 7 14)(font "Arial" (font_size 8))) + (text "q" (rect 68 27 75 41)(font "Arial" (font_size 8))) + (line (pt 96 32)(pt 80 32)) + ) + (drawing + (rectangle (rect 16 16 80 80)) + ) +) +(symbol + (rect 704 -208 800 -112) + (text "DigitalFilterBlockSingle" (rect 5 0 130 14)(font "Arial" (font_size 8))) + (text "inst26" (rect 8 80 37 92)(font "Arial" )) + (port + (pt 0 32) + (input) + (text "d" (rect 0 0 7 14)(font "Arial" (font_size 8))) + (text "d" (rect 21 27 28 41)(font "Arial" (font_size 8))) + (line (pt 0 32)(pt 16 32)) + ) + (port + (pt 0 48) + (input) + (text "clk" (rect 0 0 15 14)(font "Arial" (font_size 8))) + (text "clk" (rect 21 43 36 57)(font "Arial" (font_size 8))) + (line (pt 0 48)(pt 16 48)) + ) + (port + (pt 96 32) + (output) + (text "q" (rect 0 0 7 14)(font "Arial" (font_size 8))) + (text "q" (rect 68 27 75 41)(font "Arial" (font_size 8))) + (line (pt 96 32)(pt 80 32)) + ) + (drawing + (rectangle (rect 16 16 80 80)) + ) +) +(symbol + (rect 1040 864 1368 1008) + (text "RAM9X8_ParallelBusMaster" (rect 5 0 139 12)(font "Arial" )) + (text "inst7" (rect 8 128 31 140)(font "Arial" )) (port (pt 0 32) (input) @@ -1640,30 +1603,30 @@ applicable agreement for further details. (port (pt 0 112) (input) - (text "error" (rect 0 0 22 12)(font "Arial" )) - (text "error" (rect 21 107 43 119)(font "Arial" )) + (text "pback" (rect 0 0 29 12)(font "Arial" )) + (text "pback" (rect 21 107 50 119)(font "Arial" )) (line (pt 0 112)(pt 16 112)) ) (port (pt 328 48) (output) - (text "asyncline" (rect 0 0 47 12)(font "Arial" )) - (text "asyncline" (rect 268 43 315 55)(font "Arial" )) + (text "pbclk" (rect 0 0 25 12)(font "Arial" )) + (text "pbclk" (rect 286 43 311 55)(font "Arial" )) (line (pt 328 48)(pt 312 48)) ) (port (pt 328 64) (output) - (text "divclk" (rect 0 0 29 12)(font "Arial" )) - (text "divclk" (rect 283 59 312 71)(font "Arial" )) + (text "pbce" (rect 0 0 23 12)(font "Arial" )) + (text "pbce" (rect 288 59 311 71)(font "Arial" )) (line (pt 328 64)(pt 312 64)) ) (port (pt 328 80) (output) - (text "init" (rect 0 0 14 12)(font "Arial" )) - (text "init" (rect 296 75 310 87)(font "Arial" )) - (line (pt 328 80)(pt 312 80)) + (text "pbdir[1..0]" (rect 0 0 49 12)(font "Arial" )) + (text "pbdir[1..0]" (rect 266 75 315 87)(font "Arial" )) + (line (pt 328 80)(pt 312 80)(line_width 3)) ) (port (pt 328 32) @@ -1672,24 +1635,56 @@ applicable agreement for further details. (text "data[data_bus_width-1..0]" (rect 208 27 334 39)(font "Arial" )) (line (pt 328 32)(pt 312 32)(line_width 3)) ) + (port + (pt 328 96) + (bidir) + (text "pbdata[15..0]" (rect 0 0 64 12)(font "Arial" )) + (text "pbdata[15..0]" (rect 258 91 322 103)(font "Arial" )) + (line (pt 328 96)(pt 312 96)(line_width 3)) + ) (parameter - "REG_ADDR_ACTIVE_DEVICE_UPPER_BYTE" - "38" + "REG_ADDR_FIRST_FREE_UPPER_BYTE" + "6" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_ACTIVE_DEVICE_LOWER_BYTE" - "39" + "REG_ADDR_FIRST_FREE_LOWER_BYTE" + "7" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_TEST_UPPER_BYTE" - "40" + "REG_ADDR_CMD_UPPER_BYTE" + "8" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_TEST_LOWER_BYTE" - "41" + "REG_ADDR_CMD_LOWER_BYTE" + "9" + "" + (type "PARAMETER_SIGNED_DEC") ) + (parameter + "REG_ADDR_FILL_ADDRESS_SPACE_UPPER_BYTE" + "10" + "" + (type "PARAMETER_SIGNED_DEC") ) + (parameter + "REG_ADDR_FILL_ADDRESS_SPACE_LOWER_BYTE" + "11" + "" + (type "PARAMETER_SIGNED_DEC") ) + (parameter + "REG_ADDR_CONTROL_UPPER_BYTE" + "12" + "" + (type "PARAMETER_SIGNED_DEC") ) + (parameter + "REG_ADDR_CONTROL_LOWER_BYTE" + "13" + "" + (type "PARAMETER_SIGNED_DEC") ) + (parameter + "ARRAY_LENGTH" + "256" "" (type "PARAMETER_SIGNED_DEC") ) (parameter @@ -1705,110 +1700,12 @@ applicable agreement for further details. (drawing (rectangle (rect 16 16 312 128)) ) - (annotation_block (parameter)(rect 1024 136 1376 240)) -) -(symbol - (rect 536 320 568 336) - (text "VCC" (rect 7 0 27 10)(font "Arial" (font_size 6))) - (text "inst20" (rect 3 5 32 17)(font "Arial" )(invisible)) - (port - (pt 16 16) - (output) - (text "1" (rect 19 7 24 19)(font "Courier New" (bold))(invisible)) - (text "1" (rect 19 7 24 19)(font "Courier New" (bold))(invisible)) - (line (pt 16 16)(pt 16 8)) - ) - (drawing - (line (pt 8 8)(pt 24 8)) - ) -) -(symbol - (rect 1040 2080 1368 2192) - (text "RAM" (rect 5 0 28 12)(font "Arial" )) - (text "inst21" (rect 8 96 37 108)(font "Arial" )) - (port - (pt 0 32) - (input) - (text "address[address_bus_width-1..0]" (rect 0 0 161 12)(font "Arial" )) - (text "address[address_bus_width-1..0]" (rect 21 27 182 39)(font "Arial" )) - (line (pt 0 32)(pt 16 32)(line_width 3)) - ) - (port - (pt 0 48) - (input) - (text "we" (rect 0 0 12 12)(font "Arial" )) - (text "we" (rect 21 43 33 55)(font "Arial" )) - (line (pt 0 48)(pt 16 48)) - ) - (port - (pt 0 64) - (input) - (text "oe" (rect 0 0 11 12)(font "Arial" )) - (text "oe" (rect 21 59 32 71)(font "Arial" )) - (line (pt 0 64)(pt 16 64)) - ) - (port - (pt 0 80) - (input) - (text "ce" (rect 0 0 11 12)(font "Arial" )) - (text "ce" (rect 21 75 32 87)(font "Arial" )) - (line (pt 0 80)(pt 16 80)) - ) - (port - (pt 328 32) - (bidir) - (text "data[data_bus_width-1..0]" (rect 0 0 126 12)(font "Arial" )) - (text "data[data_bus_width-1..0]" (rect 208 27 334 39)(font "Arial" )) - (line (pt 328 32)(pt 312 32)(line_width 3)) - ) - (parameter - "DATA_BUS_WIDTH" - "8" - "" - (type "PARAMETER_SIGNED_DEC") ) - (parameter - "ADDRESS_BUS_WIDTH" - "9" - "" - (type "PARAMETER_SIGNED_DEC") ) - (drawing - (rectangle (rect 16 16 312 96)) - ) - (annotation_block (parameter)(rect 1032 2032 1272 2080)) -) -(symbol - (rect 704 -64 800 32) - (text "DigitalFilterBlockSingle" (rect 5 0 130 14)(font "Arial" (font_size 8))) - (text "inst22" (rect 8 80 37 92)(font "Arial" )) - (port - (pt 0 32) - (input) - (text "d" (rect 0 0 7 14)(font "Arial" (font_size 8))) - (text "d" (rect 21 27 28 41)(font "Arial" (font_size 8))) - (line (pt 0 32)(pt 16 32)) - ) - (port - (pt 0 48) - (input) - (text "clk" (rect 0 0 15 14)(font "Arial" (font_size 8))) - (text "clk" (rect 21 43 36 57)(font "Arial" (font_size 8))) - (line (pt 0 48)(pt 16 48)) - ) - (port - (pt 96 32) - (output) - (text "q" (rect 0 0 7 14)(font "Arial" (font_size 8))) - (text "q" (rect 68 27 75 41)(font "Arial" (font_size 8))) - (line (pt 96 32)(pt 80 32)) - ) - (drawing - (rectangle (rect 16 16 80 80)) - ) + (annotation_block (parameter)(rect 1024 696 1408 864)) ) (symbol (rect 1040 -144 1368 64) (text "RAM9X8_Loader" (rect 5 0 85 12)(font "Arial" )) - (text "inst23" (rect 8 192 37 204)(font "Arial" )) + (text "inst21" (rect 8 192 37 204)(font "Arial" )) (port (pt 0 32) (input) @@ -1930,12 +1827,12 @@ applicable agreement for further details. ) (parameter "REG_ADDR_LOADER_UPPER_BYTE" - "42" + "44" "" (type "PARAMETER_SIGNED_DEC") ) (parameter "REG_ADDR_LOADER_LOWER_BYTE" - "43" + "45" "" (type "PARAMETER_SIGNED_DEC") ) (parameter @@ -2022,44 +1919,44 @@ applicable agreement for further details. ) (parameter "REG_ADDR_CMD_2_UPPER_BYTE" - "44" - "" - (type "PARAMETER_SIGNED_DEC") ) - (parameter - "REG_ADDR_CMD_2_LOWER_BYTE" - "45" - "" - (type "PARAMETER_SIGNED_DEC") ) - (parameter - "REG_ADDR_CMD_1_UPPER_BYTE" "46" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_CMD_1_LOWER_BYTE" + "REG_ADDR_CMD_2_LOWER_BYTE" "47" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_DATA_2_UPPER_BYTE" + "REG_ADDR_CMD_1_UPPER_BYTE" "48" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_DATA_2_LOWER_BYTE" + "REG_ADDR_CMD_1_LOWER_BYTE" "49" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_DATA_1_UPPER_BYTE" + "REG_ADDR_DATA_2_UPPER_BYTE" "50" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_DATA_1_LOWER_BYTE" + "REG_ADDR_DATA_2_LOWER_BYTE" "51" "" (type "PARAMETER_SIGNED_DEC") ) + (parameter + "REG_ADDR_DATA_1_UPPER_BYTE" + "52" + "" + (type "PARAMETER_SIGNED_DEC") ) + (parameter + "REG_ADDR_DATA_1_LOWER_BYTE" + "53" + "" + (type "PARAMETER_SIGNED_DEC") ) (parameter "DATA_BUS_WIDTH" "8" @@ -2075,68 +1972,10 @@ applicable agreement for further details. ) (annotation_block (parameter)(rect 1024 -552 1336 -392)) ) -(symbol - (rect 704 -312 800 -216) - (text "DigitalFilterBlockSingle" (rect 5 0 130 14)(font "Arial" (font_size 8))) - (text "inst25" (rect 8 80 37 92)(font "Arial" )) - (port - (pt 0 32) - (input) - (text "d" (rect 0 0 7 14)(font "Arial" (font_size 8))) - (text "d" (rect 21 27 28 41)(font "Arial" (font_size 8))) - (line (pt 0 32)(pt 16 32)) - ) - (port - (pt 0 48) - (input) - (text "clk" (rect 0 0 15 14)(font "Arial" (font_size 8))) - (text "clk" (rect 21 43 36 57)(font "Arial" (font_size 8))) - (line (pt 0 48)(pt 16 48)) - ) - (port - (pt 96 32) - (output) - (text "q" (rect 0 0 7 14)(font "Arial" (font_size 8))) - (text "q" (rect 68 27 75 41)(font "Arial" (font_size 8))) - (line (pt 96 32)(pt 80 32)) - ) - (drawing - (rectangle (rect 16 16 80 80)) - ) -) -(symbol - (rect 704 -208 800 -112) - (text "DigitalFilterBlockSingle" (rect 5 0 130 14)(font "Arial" (font_size 8))) - (text "inst26" (rect 8 80 37 92)(font "Arial" )) - (port - (pt 0 32) - (input) - (text "d" (rect 0 0 7 14)(font "Arial" (font_size 8))) - (text "d" (rect 21 27 28 41)(font "Arial" (font_size 8))) - (line (pt 0 32)(pt 16 32)) - ) - (port - (pt 0 48) - (input) - (text "clk" (rect 0 0 15 14)(font "Arial" (font_size 8))) - (text "clk" (rect 21 43 36 57)(font "Arial" (font_size 8))) - (line (pt 0 48)(pt 16 48)) - ) - (port - (pt 96 32) - (output) - (text "q" (rect 0 0 7 14)(font "Arial" (font_size 8))) - (text "q" (rect 68 27 75 41)(font "Arial" (font_size 8))) - (line (pt 96 32)(pt 80 32)) - ) - (drawing - (rectangle (rect 16 16 80 80)) - ) -) (symbol (rect 1048 1880 1376 2024) (text "RAM9X8_OpticalBusMaster" (rect 5 0 138 12)(font "Arial" )) - (text "inst1" (rect 8 128 31 140)(font "Arial" )) + (text "inst27" (rect 8 128 37 140)(font "Arial" )) (port (pt 0 32) (input) @@ -2195,94 +2034,94 @@ applicable agreement for further details. ) (parameter "REG_ADDR_CMD_UPPER_BYTE" - "52" - "" - (type "PARAMETER_SIGNED_DEC") ) - (parameter - "REG_ADDR_CMD_LOWER_BYTE" - "53" - "" - (type "PARAMETER_SIGNED_DEC") ) - (parameter - "REG_ADDR_WORD_8_UPPER_BYTE" "54" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_WORD_8_LOWER_BYTE" + "REG_ADDR_CMD_LOWER_BYTE" "55" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_WORD_7_UPPER_BYTE" + "REG_ADDR_WORD_8_UPPER_BYTE" "56" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_WORD_7_LOWER_BYTE" + "REG_ADDR_WORD_8_LOWER_BYTE" "57" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_WORD_6_UPPER_BYTE" + "REG_ADDR_WORD_7_UPPER_BYTE" "58" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_WORD_6_LOWER_BYTE" + "REG_ADDR_WORD_7_LOWER_BYTE" "59" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_WORD_5_UPPER_BYTE" + "REG_ADDR_WORD_6_UPPER_BYTE" "60" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_WORD_5_LOWER_BYTE" + "REG_ADDR_WORD_6_LOWER_BYTE" "61" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_WORD_4_UPPER_BYTE" + "REG_ADDR_WORD_5_UPPER_BYTE" "62" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_WORD_4_LOWER_BYTE" + "REG_ADDR_WORD_5_LOWER_BYTE" "63" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_WORD_3_UPPER_BYTE" + "REG_ADDR_WORD_4_UPPER_BYTE" "64" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_WORD_3_LOWER_BYTE" + "REG_ADDR_WORD_4_LOWER_BYTE" "65" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_WORD_2_UPPER_BYTE" + "REG_ADDR_WORD_3_UPPER_BYTE" "66" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_WORD_2_LOWER_BYTE" + "REG_ADDR_WORD_3_LOWER_BYTE" "67" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_WORD_1_UPPER_BYTE" + "REG_ADDR_WORD_2_UPPER_BYTE" "68" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_WORD_1_LOWER_BYTE" + "REG_ADDR_WORD_2_LOWER_BYTE" "69" "" (type "PARAMETER_SIGNED_DEC") ) + (parameter + "REG_ADDR_WORD_1_UPPER_BYTE" + "70" + "" + (type "PARAMETER_SIGNED_DEC") ) + (parameter + "REG_ADDR_WORD_1_LOWER_BYTE" + "71" + "" + (type "PARAMETER_SIGNED_DEC") ) (parameter "DATA_BUS_WIDTH" "8" @@ -2298,6 +2137,179 @@ applicable agreement for further details. ) (annotation_block (parameter)(rect 1032 1584 1344 1880)) ) +(symbol + (rect 1040 240 1368 384) + (text "RAM9X8_LedController" (rect 5 0 117 12)(font "Arial" )) + (text "inst29" (rect 8 128 37 140)(font "Arial" )) + (port + (pt 0 32) + (input) + (text "clk" (rect 0 0 14 12)(font "Arial" )) + (text "clk" (rect 21 27 35 39)(font "Arial" )) + (line (pt 0 32)(pt 16 32)) + ) + (port + (pt 0 48) + (input) + (text "address[address_bus_width-1..0]" (rect 0 0 161 12)(font "Arial" )) + (text "address[address_bus_width-1..0]" (rect 21 43 182 55)(font "Arial" )) + (line (pt 0 48)(pt 16 48)(line_width 3)) + ) + (port + (pt 0 64) + (input) + (text "we" (rect 0 0 12 12)(font "Arial" )) + (text "we" (rect 21 59 33 71)(font "Arial" )) + (line (pt 0 64)(pt 16 64)) + ) + (port + (pt 0 80) + (input) + (text "oe" (rect 0 0 11 12)(font "Arial" )) + (text "oe" (rect 21 75 32 87)(font "Arial" )) + (line (pt 0 80)(pt 16 80)) + ) + (port + (pt 0 96) + (input) + (text "ce" (rect 0 0 11 12)(font "Arial" )) + (text "ce" (rect 21 91 32 103)(font "Arial" )) + (line (pt 0 96)(pt 16 96)) + ) + (port + (pt 0 112) + (input) + (text "error" (rect 0 0 22 12)(font "Arial" )) + (text "error" (rect 21 107 43 119)(font "Arial" )) + (line (pt 0 112)(pt 16 112)) + ) + (port + (pt 328 48) + (output) + (text "asyncline" (rect 0 0 47 12)(font "Arial" )) + (text "asyncline" (rect 268 43 315 55)(font "Arial" )) + (line (pt 328 48)(pt 312 48)) + ) + (port + (pt 328 64) + (output) + (text "divclk" (rect 0 0 29 12)(font "Arial" )) + (text "divclk" (rect 283 59 312 71)(font "Arial" )) + (line (pt 328 64)(pt 312 64)) + ) + (port + (pt 328 80) + (output) + (text "init" (rect 0 0 14 12)(font "Arial" )) + (text "init" (rect 296 75 310 87)(font "Arial" )) + (line (pt 328 80)(pt 312 80)) + ) + (port + (pt 328 32) + (bidir) + (text "data[data_bus_width-1..0]" (rect 0 0 126 12)(font "Arial" )) + (text "data[data_bus_width-1..0]" (rect 208 27 334 39)(font "Arial" )) + (line (pt 328 32)(pt 312 32)(line_width 3)) + ) + (parameter + "REG_ADDR_ACTIVE_DEVICE_UPPER_BYTE" + "38" + "" + (type "PARAMETER_SIGNED_DEC") ) + (parameter + "REG_ADDR_ACTIVE_DEVICE_LOWER_BYTE" + "39" + "" + (type "PARAMETER_SIGNED_DEC") ) + (parameter + "REG_ADDR_TEST_UPPER_BYTE" + "40" + "" + (type "PARAMETER_SIGNED_DEC") ) + (parameter + "REG_ADDR_TEST_LOWER_BYTE" + "41" + "" + (type "PARAMETER_SIGNED_DEC") ) + (parameter + "REG_ADDR_VERSION_UPPER_BYTE" + "42" + "" + (type "PARAMETER_SIGNED_DEC") ) + (parameter + "REG_ADDR_VERSION_LOWER_BYTE" + "43" + "" + (type "PARAMETER_SIGNED_DEC") ) + (parameter + "DATA_BUS_WIDTH" + "8" + "" + (type "PARAMETER_SIGNED_DEC") ) + (parameter + "ADDRESS_BUS_WIDTH" + "9" + "" + (type "PARAMETER_SIGNED_DEC") ) + (drawing + (rectangle (rect 16 16 312 128)) + ) + (annotation_block (parameter)(rect 1024 112 1376 240)) +) +(symbol + (rect 1048 2080 1376 2192) + (text "RAM" (rect 5 0 28 12)(font "Arial" )) + (text "inst31" (rect 8 96 37 108)(font "Arial" )) + (port + (pt 0 32) + (input) + (text "address[address_bus_width-1..0]" (rect 0 0 161 12)(font "Arial" )) + (text "address[address_bus_width-1..0]" (rect 21 27 182 39)(font "Arial" )) + (line (pt 0 32)(pt 16 32)(line_width 3)) + ) + (port + (pt 0 48) + (input) + (text "we" (rect 0 0 12 12)(font "Arial" )) + (text "we" (rect 21 43 33 55)(font "Arial" )) + (line (pt 0 48)(pt 16 48)) + ) + (port + (pt 0 64) + (input) + (text "oe" (rect 0 0 11 12)(font "Arial" )) + (text "oe" (rect 21 59 32 71)(font "Arial" )) + (line (pt 0 64)(pt 16 64)) + ) + (port + (pt 0 80) + (input) + (text "ce" (rect 0 0 11 12)(font "Arial" )) + (text "ce" (rect 21 75 32 87)(font "Arial" )) + (line (pt 0 80)(pt 16 80)) + ) + (port + (pt 328 32) + (bidir) + (text "data[data_bus_width-1..0]" (rect 0 0 126 12)(font "Arial" )) + (text "data[data_bus_width-1..0]" (rect 208 27 334 39)(font "Arial" )) + (line (pt 328 32)(pt 312 32)(line_width 3)) + ) + (parameter + "DATA_BUS_WIDTH" + "8" + "" + (type "PARAMETER_SIGNED_DEC") ) + (parameter + "ADDRESS_BUS_WIDTH" + "9" + "" + (type "PARAMETER_SIGNED_DEC") ) + (drawing + (rectangle (rect 16 16 312 96)) + ) + (annotation_block (parameter)(rect 1032 2032 1272 2080)) +) (connector (pt 488 136) (pt 488 120) @@ -3036,23 +3048,6 @@ applicable agreement for further details. (pt 800 -280) (pt 904 -280) ) -(connector - (pt 1000 2112) - (pt 1040 2112) - (bus) -) -(connector - (pt 984 2128) - (pt 1040 2128) -) -(connector - (pt 968 2144) - (pt 1040 2144) -) -(connector - (pt 952 2160) - (pt 1040 2160) -) (connector (pt 1000 912) (pt 1000 1448) @@ -3071,10 +3066,42 @@ applicable agreement for further details. (pt 952 1496) ) (connector - (pt 1048 1928) (pt 1000 1928) + (pt 1048 1928) (bus) ) +(connector + (pt 1856 1928) + (pt 1376 1928) +) +(connector + (pt 984 1944) + (pt 1048 1944) +) +(connector + (pt 1856 1944) + (pt 1376 1944) +) +(connector + (pt 968 1960) + (pt 1048 1960) +) +(connector + (pt 952 1976) + (pt 1048 1976) +) +(connector + (pt 608 1912) + (pt 1048 1912) +) +(connector + (pt 608 1432) + (pt 608 1512) +) +(connector + (pt 608 1512) + (pt 608 1912) +) (connector (pt 1000 1448) (pt 1000 1928) @@ -3085,10 +3112,6 @@ applicable agreement for further details. (pt 1000 2112) (bus) ) -(connector - (pt 1048 1944) - (pt 984 1944) -) (connector (pt 984 1464) (pt 984 1944) @@ -3097,10 +3120,6 @@ applicable agreement for further details. (pt 984 1944) (pt 984 2128) ) -(connector - (pt 1048 1960) - (pt 968 1960) -) (connector (pt 968 1480) (pt 968 1960) @@ -3109,10 +3128,6 @@ applicable agreement for further details. (pt 968 1960) (pt 968 2144) ) -(connector - (pt 1048 1976) - (pt 952 1976) -) (connector (pt 952 1496) (pt 952 1976) @@ -3122,29 +3137,26 @@ applicable agreement for further details. (pt 952 2160) ) (connector - (pt 1048 1912) - (pt 608 1912) -) -(connector - (pt 608 1432) - (pt 608 1512) -) -(connector - (pt 608 1512) - (pt 608 1912) -) -(connector - (pt 1368 2112) - (pt 1856 2112) + (pt 1000 2112) + (pt 1048 2112) (bus) ) (connector - (pt 1376 1928) - (pt 1856 1928) + (pt 984 2128) + (pt 1048 2128) ) (connector - (pt 1376 1944) - (pt 1856 1944) + (pt 968 2144) + (pt 1048 2144) +) +(connector + (pt 952 2160) + (pt 1048 2160) +) +(connector + (pt 1376 2112) + (pt 1856 2112) + (bus) ) (junction (pt 1000 288)) (junction (pt 984 304)) diff --git a/MainController/RAM9X8_HWPBusMaster.bsf b/MainController/RAM9X8_HWPBusMaster.bsf index 5aeff73..0ff6e4d 100644 --- a/MainController/RAM9X8_HWPBusMaster.bsf +++ b/MainController/RAM9X8_HWPBusMaster.bsf @@ -88,44 +88,44 @@ applicable agreement for further details. ) (parameter "REG_ADDR_CMD_2_UPPER_BYTE" - "44" - "" - (type "PARAMETER_SIGNED_DEC") ) - (parameter - "REG_ADDR_CMD_2_LOWER_BYTE" - "45" - "" - (type "PARAMETER_SIGNED_DEC") ) - (parameter - "REG_ADDR_CMD_1_UPPER_BYTE" "46" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_CMD_1_LOWER_BYTE" + "REG_ADDR_CMD_2_LOWER_BYTE" "47" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_DATA_2_UPPER_BYTE" + "REG_ADDR_CMD_1_UPPER_BYTE" "48" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_DATA_2_LOWER_BYTE" + "REG_ADDR_CMD_1_LOWER_BYTE" "49" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_DATA_1_UPPER_BYTE" + "REG_ADDR_DATA_2_UPPER_BYTE" "50" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_DATA_1_LOWER_BYTE" + "REG_ADDR_DATA_2_LOWER_BYTE" "51" "" (type "PARAMETER_SIGNED_DEC") ) + (parameter + "REG_ADDR_DATA_1_UPPER_BYTE" + "52" + "" + (type "PARAMETER_SIGNED_DEC") ) + (parameter + "REG_ADDR_DATA_1_LOWER_BYTE" + "53" + "" + (type "PARAMETER_SIGNED_DEC") ) (parameter "DATA_BUS_WIDTH" "8" diff --git a/MainController/RAM9X8_HWPBusMaster.vhd b/MainController/RAM9X8_HWPBusMaster.vhd index 3dbffbf..88116f1 100644 --- a/MainController/RAM9X8_HWPBusMaster.vhd +++ b/MainController/RAM9X8_HWPBusMaster.vhd @@ -5,14 +5,14 @@ use ieee.std_logic_unsigned.all; entity RAM9X8_HWPBusMaster is generic( - REG_ADDR_CMD_2_UPPER_BYTE : integer := 44; - REG_ADDR_CMD_2_LOWER_BYTE : integer := 45; - REG_ADDR_CMD_1_UPPER_BYTE : integer := 46; - REG_ADDR_CMD_1_LOWER_BYTE : integer := 47; - REG_ADDR_DATA_2_UPPER_BYTE : integer := 48; - REG_ADDR_DATA_2_LOWER_BYTE : integer := 49; - REG_ADDR_DATA_1_UPPER_BYTE : integer := 50; - REG_ADDR_DATA_1_LOWER_BYTE : integer := 51; + 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; DATA_BUS_WIDTH : integer := 8; ADDRESS_BUS_WIDTH : integer := 9 diff --git a/MainController/RAM9X8_LedController.bsf b/MainController/RAM9X8_LedController.bsf index 9977c9b..4db0e15 100644 --- a/MainController/RAM9X8_LedController.bsf +++ b/MainController/RAM9X8_LedController.bsf @@ -113,6 +113,16 @@ applicable agreement for further details. "41" "" (type "PARAMETER_SIGNED_DEC") ) + (parameter + "REG_ADDR_VERSION_UPPER_BYTE" + "42" + "" + (type "PARAMETER_SIGNED_DEC") ) + (parameter + "REG_ADDR_VERSION_LOWER_BYTE" + "43" + "" + (type "PARAMETER_SIGNED_DEC") ) (parameter "DATA_BUS_WIDTH" "8" diff --git a/MainController/RAM9X8_LedController.vhd b/MainController/RAM9X8_LedController.vhd index 7c2ae8a..7bd46f3 100644 --- a/MainController/RAM9X8_LedController.vhd +++ b/MainController/RAM9X8_LedController.vhd @@ -9,6 +9,8 @@ entity RAM9X8_LedController is 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; DATA_BUS_WIDTH : integer := 8; ADDRESS_BUS_WIDTH : integer := 9 @@ -34,6 +36,7 @@ architecture behavorial of RAM9X8_LedController is signal activeDeviceBuf : std_logic_vector(15 downto 0) := (others => '0'); signal testBuf : std_logic_vector(15 downto 0) := (others => '0'); +signal versionBuf : std_logic_vector(15 downto 0) := x"0004"; signal initBuf : std_logic := '0'; signal divClkBuf : std_logic := '0'; @@ -69,6 +72,10 @@ begin data <= not testBuf(15 downto 8); when REG_ADDR_TEST_LOWER_BYTE => data <= not testBuf(7 downto 0); + when REG_ADDR_VERSION_UPPER_BYTE => + data <= versionBuf(15 downto 8); + when REG_ADDR_VERSION_LOWER_BYTE => + data <= versionBuf(7 downto 0); when others => data <= (others => 'Z'); -- Запретить запись на шину end case; diff --git a/MainController/RAM9X8_Loader.bsf b/MainController/RAM9X8_Loader.bsf index 47741d6..f9cde48 100644 --- a/MainController/RAM9X8_Loader.bsf +++ b/MainController/RAM9X8_Loader.bsf @@ -144,12 +144,12 @@ applicable agreement for further details. ) (parameter "REG_ADDR_LOADER_UPPER_BYTE" - "42" + "44" "" (type "PARAMETER_SIGNED_DEC") ) (parameter "REG_ADDR_LOADER_LOWER_BYTE" - "43" + "45" "" (type "PARAMETER_SIGNED_DEC") ) (parameter diff --git a/MainController/RAM9X8_Loader.vhd b/MainController/RAM9X8_Loader.vhd index 3e28cbf..46bf898 100644 --- a/MainController/RAM9X8_Loader.vhd +++ b/MainController/RAM9X8_Loader.vhd @@ -5,8 +5,8 @@ use ieee.std_logic_unsigned.all; entity RAM9X8_Loader is generic( - REG_ADDR_LOADER_UPPER_BYTE : integer := 42; - REG_ADDR_LOADER_LOWER_BYTE : integer := 43; + REG_ADDR_LOADER_UPPER_BYTE : integer := 44; + REG_ADDR_LOADER_LOWER_BYTE : integer := 45; DATA_BUS_WIDTH : integer := 8; ADDRESS_BUS_WIDTH : integer := 9 diff --git a/MainController/RAM9X8_OpticalBusMaster.bsf b/MainController/RAM9X8_OpticalBusMaster.bsf index 3f9b745..ae4f16d 100644 --- a/MainController/RAM9X8_OpticalBusMaster.bsf +++ b/MainController/RAM9X8_OpticalBusMaster.bsf @@ -81,94 +81,94 @@ applicable agreement for further details. ) (parameter "REG_ADDR_CMD_UPPER_BYTE" - "52" - "" - (type "PARAMETER_SIGNED_DEC") ) - (parameter - "REG_ADDR_CMD_LOWER_BYTE" - "53" - "" - (type "PARAMETER_SIGNED_DEC") ) - (parameter - "REG_ADDR_WORD_8_UPPER_BYTE" "54" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_WORD_8_LOWER_BYTE" + "REG_ADDR_CMD_LOWER_BYTE" "55" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_WORD_7_UPPER_BYTE" + "REG_ADDR_WORD_8_UPPER_BYTE" "56" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_WORD_7_LOWER_BYTE" + "REG_ADDR_WORD_8_LOWER_BYTE" "57" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_WORD_6_UPPER_BYTE" + "REG_ADDR_WORD_7_UPPER_BYTE" "58" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_WORD_6_LOWER_BYTE" + "REG_ADDR_WORD_7_LOWER_BYTE" "59" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_WORD_5_UPPER_BYTE" + "REG_ADDR_WORD_6_UPPER_BYTE" "60" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_WORD_5_LOWER_BYTE" + "REG_ADDR_WORD_6_LOWER_BYTE" "61" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_WORD_4_UPPER_BYTE" + "REG_ADDR_WORD_5_UPPER_BYTE" "62" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_WORD_4_LOWER_BYTE" + "REG_ADDR_WORD_5_LOWER_BYTE" "63" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_WORD_3_UPPER_BYTE" + "REG_ADDR_WORD_4_UPPER_BYTE" "64" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_WORD_3_LOWER_BYTE" + "REG_ADDR_WORD_4_LOWER_BYTE" "65" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_WORD_2_UPPER_BYTE" + "REG_ADDR_WORD_3_UPPER_BYTE" "66" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_WORD_2_LOWER_BYTE" + "REG_ADDR_WORD_3_LOWER_BYTE" "67" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_WORD_1_UPPER_BYTE" + "REG_ADDR_WORD_2_UPPER_BYTE" "68" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_WORD_1_LOWER_BYTE" + "REG_ADDR_WORD_2_LOWER_BYTE" "69" "" (type "PARAMETER_SIGNED_DEC") ) + (parameter + "REG_ADDR_WORD_1_UPPER_BYTE" + "70" + "" + (type "PARAMETER_SIGNED_DEC") ) + (parameter + "REG_ADDR_WORD_1_LOWER_BYTE" + "71" + "" + (type "PARAMETER_SIGNED_DEC") ) (parameter "DATA_BUS_WIDTH" "8" diff --git a/MainController/RAM9X8_OpticalBusMaster.vhd b/MainController/RAM9X8_OpticalBusMaster.vhd index 02ad479..3e50d5c 100644 --- a/MainController/RAM9X8_OpticalBusMaster.vhd +++ b/MainController/RAM9X8_OpticalBusMaster.vhd @@ -5,24 +5,24 @@ use ieee.std_logic_unsigned.all; entity RAM9X8_OpticalBusMaster is generic( - REG_ADDR_CMD_UPPER_BYTE : integer := 52; - REG_ADDR_CMD_LOWER_BYTE : integer := 53; - REG_ADDR_WORD_8_UPPER_BYTE : integer := 54; - REG_ADDR_WORD_8_LOWER_BYTE : integer := 55; - REG_ADDR_WORD_7_UPPER_BYTE : integer := 56; - REG_ADDR_WORD_7_LOWER_BYTE : integer := 57; - REG_ADDR_WORD_6_UPPER_BYTE : integer := 58; - REG_ADDR_WORD_6_LOWER_BYTE : integer := 59; - REG_ADDR_WORD_5_UPPER_BYTE : integer := 60; - REG_ADDR_WORD_5_LOWER_BYTE : integer := 61; - REG_ADDR_WORD_4_UPPER_BYTE : integer := 62; - REG_ADDR_WORD_4_LOWER_BYTE : integer := 63; - REG_ADDR_WORD_3_UPPER_BYTE : integer := 64; - REG_ADDR_WORD_3_LOWER_BYTE : integer := 65; - REG_ADDR_WORD_2_UPPER_BYTE : integer := 66; - REG_ADDR_WORD_2_LOWER_BYTE : integer := 67; - REG_ADDR_WORD_1_UPPER_BYTE : integer := 68; - REG_ADDR_WORD_1_LOWER_BYTE : integer := 69; + 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; DATA_BUS_WIDTH : integer := 8; ADDRESS_BUS_WIDTH : integer := 9 @@ -46,7 +46,7 @@ architecture behavorial of RAM9X8_OpticalBusMaster is signal dataBuf : std_logic_vector(127 downto 0) := (others => '0'); signal dataToSend : std_logic_vector(127 downto 0) := (others => '0'); -signal cmdBuf : std_logic_vector(15 downto 0) := (others => '0'); +signal cmdBuf : std_logic_vector(15 downto 0) := x"0004"; type CommunicationState_start is (Waiting, DataSending, CRCSending); signal CommunicationState : CommunicationState_start := Waiting ; @@ -192,7 +192,11 @@ begin if start = '1' and startPrev = '0' then dataToSend <= dataBuf; dataCRC <= dataBuf; - bitCnt := (conv_integer(cmdBuf(2 downto 0)) * 16) - 1; + if conv_integer(cmdBuf(3 downto 0)) < 9 and conv_integer(cmdBuf(3 downto 0)) > 0 then + bitCnt := (conv_integer(cmdBuf(3 downto 0)) * 16) - 1; + else + bitCnt := 63; + end if; CommunicationState <= DataSending; resetCRC <= '0'; end if; @@ -254,7 +258,11 @@ begin begin if rising_edge(clk) then if resetCRC = '1' then - bitCnt := (conv_integer(cmdBuf(2 downto 0)) * 16) - 1; + if conv_integer(cmdBuf(3 downto 0)) < 9 and conv_integer(cmdBuf(3 downto 0)) > 0 then + bitCnt := (conv_integer(cmdBuf(3 downto 0)) * 16) - 1; + else + bitCnt := 63; + end if; CRC <= x"0"; lacth := 0; readyCRC <= '0'; diff --git a/MainController/RAM9X8_ParallelBusMaster.bsf b/MainController/RAM9X8_ParallelBusMaster.bsf index a4609e2..8d0606d 100644 --- a/MainController/RAM9X8_ParallelBusMaster.bsf +++ b/MainController/RAM9X8_ParallelBusMaster.bsf @@ -142,7 +142,7 @@ applicable agreement for further details. (type "PARAMETER_SIGNED_DEC") ) (parameter "ARRAY_LENGTH" - "128" + "256" "" (type "PARAMETER_SIGNED_DEC") ) (parameter diff --git a/MainController/RAM9X8_ParallelBusMaster.vhd b/MainController/RAM9X8_ParallelBusMaster.vhd index 5d088d5..955198d 100644 --- a/MainController/RAM9X8_ParallelBusMaster.vhd +++ b/MainController/RAM9X8_ParallelBusMaster.vhd @@ -14,7 +14,7 @@ entity RAM9X8_ParallelBusMaster is REG_ADDR_CONTROL_UPPER_BYTE : integer := 12; REG_ADDR_CONTROL_LOWER_BYTE : integer := 13; - ARRAY_LENGTH : integer := 128; + ARRAY_LENGTH : integer := 256; DATA_BUS_WIDTH : integer := 8; ADDRESS_BUS_WIDTH : integer := 9 );