diff --git a/MainController/MainController.bdf b/MainController/MainController.bdf index 6d750cc..cc973c5 100644 --- a/MainController/MainController.bdf +++ b/MainController/MainController.bdf @@ -172,9 +172,26 @@ applicable agreement for further details. (text "VCC" (rect 128 7 148 17)(font "Arial" (font_size 6))) (annotation_block (location)(rect 304 1520 360 1608)) ) +(pin + (input) + (rect 376 -40 544 -24) + (text "INPUT" (rect 125 0 153 10)(font "Arial" (font_size 6))) + (text "Error0In" (rect 5 0 44 12)(font "Arial" )) + (pt 168 8) + (drawing + (line (pt 84 12)(pt 109 12)) + (line (pt 84 4)(pt 109 4)) + (line (pt 113 8)(pt 168 8)) + (line (pt 84 12)(pt 84 4)) + (line (pt 109 4)(pt 113 8)) + (line (pt 109 12)(pt 113 8)) + ) + (text "VCC" (rect 128 7 148 17)(font "Arial" (font_size 6))) + (annotation_block (location)(rect 320 -40 368 -24)) +) (pin (output) - (rect 1840 24 2016 40) + (rect 1840 -232 2016 -216) (text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6))) (text "FPGA_LED_1" (rect 90 0 158 12)(font "Arial" )) (pt 0 8) @@ -187,11 +204,11 @@ applicable agreement for further details. (line (pt 82 8)(pt 78 12)) (line (pt 78 12)(pt 82 8)) ) - (annotation_block (location)(rect 2024 24 2080 40)) + (annotation_block (location)(rect 2024 -232 2080 -216)) ) (pin (output) - (rect 1840 112 2016 128) + (rect 1840 128 2016 144) (text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6))) (text "FPGA_LED_2" (rect 90 0 158 12)(font "Arial" )) (pt 0 8) @@ -204,11 +221,11 @@ applicable agreement for further details. (line (pt 82 8)(pt 78 12)) (line (pt 78 12)(pt 82 8)) ) - (annotation_block (location)(rect 2024 112 2080 128)) + (annotation_block (location)(rect 2024 128 2080 144)) ) (pin (output) - (rect 1840 128 2016 144) + (rect 1840 144 2016 160) (text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6))) (text "FPGA_LED_3" (rect 90 0 158 12)(font "Arial" )) (pt 0 8) @@ -221,7 +238,7 @@ applicable agreement for further details. (line (pt 82 8)(pt 78 12)) (line (pt 78 12)(pt 82 8)) ) - (annotation_block (location)(rect 2024 128 2080 144)) + (annotation_block (location)(rect 2024 144 2080 160)) ) (pin (output) @@ -276,7 +293,7 @@ applicable agreement for further details. ) (pin (output) - (rect 1840 56 2016 72) + (rect 1840 64 2016 80) (text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6))) (text "DIRen" (rect 90 0 121 12)(font "Arial" )) (pt 0 8) @@ -289,11 +306,11 @@ applicable agreement for further details. (line (pt 82 8)(pt 78 12)) (line (pt 78 12)(pt 82 8)) ) - (annotation_block (location)(rect 2024 56 2072 72)) + (annotation_block (location)(rect 2024 64 2072 80)) ) (pin (output) - (rect 1840 -24 2016 -8) + (rect 1840 -8 2016 8) (text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6))) (text "TKdir[3..0]" (rect 90 0 140 12)(font "Arial" )) (pt 0 8) @@ -306,7 +323,7 @@ applicable agreement for further details. (line (pt 82 8)(pt 78 12)) (line (pt 78 12)(pt 82 8)) ) - (annotation_block (location)(rect 2024 -80 2080 -24)) + (annotation_block (location)(rect 2080 -64 2136 -8)) ) (pin (output) @@ -378,7 +395,7 @@ applicable agreement for further details. ) (pin (output) - (rect 1840 -8 2016 8) + (rect 1840 8 2016 24) (text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6))) (text "DIR7" (rect 90 0 115 12)(font "Arial" )) (pt 0 8) @@ -391,11 +408,11 @@ applicable agreement for further details. (line (pt 82 8)(pt 78 12)) (line (pt 78 12)(pt 82 8)) ) - (annotation_block (location)(rect 2024 -8 2072 8)) + (annotation_block (location)(rect 2024 8 2072 24)) ) (pin (output) - (rect 1840 40 2016 56) + (rect 1840 48 2016 64) (text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6))) (text "DIR9" (rect 90 0 115 12)(font "Arial" )) (pt 0 8) @@ -408,11 +425,11 @@ applicable agreement for further details. (line (pt 82 8)(pt 78 12)) (line (pt 78 12)(pt 82 8)) ) - (annotation_block (location)(rect 2024 40 2072 56)) + (annotation_block (location)(rect 2024 48 2072 64)) ) (pin (output) - (rect 1840 8 2016 24) + (rect 1840 24 2016 40) (text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6))) (text "DIR8" (rect 90 0 115 12)(font "Arial" )) (pt 0 8) @@ -425,7 +442,7 @@ applicable agreement for further details. (line (pt 82 8)(pt 78 12)) (line (pt 78 12)(pt 82 8)) ) - (annotation_block (location)(rect 2024 8 2072 24)) + (annotation_block (location)(rect 2024 24 2072 40)) ) (pin (output) @@ -476,6 +493,7 @@ applicable agreement for further details. (line (pt 82 8)(pt 78 12)) (line (pt 78 12)(pt 82 8)) ) + (annotation_block (location)(rect 2016 296 2064 312)) ) (pin (output) @@ -492,6 +510,143 @@ applicable agreement for further details. (line (pt 82 8)(pt 78 12)) (line (pt 78 12)(pt 82 8)) ) + (annotation_block (location)(rect 2016 312 2064 328)) +) +(pin + (output) + (rect 1840 -24 2016 -8) + (text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6))) + (text "LoadMode" (rect 90 0 139 12)(font "Arial" )) + (pt 0 8) + (drawing + (line (pt 0 8)(pt 52 8)) + (line (pt 52 4)(pt 78 4)) + (line (pt 52 12)(pt 78 12)) + (line (pt 52 12)(pt 52 4)) + (line (pt 78 4)(pt 82 8)) + (line (pt 82 8)(pt 78 12)) + (line (pt 78 12)(pt 82 8)) + ) + (annotation_block (location)(rect 2024 -24 2072 -8)) +) +(pin + (output) + (rect 1840 -136 2016 -120) + (text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6))) + (text "AddrDevice_2" (rect 90 0 159 12)(font "Arial" )) + (pt 0 8) + (drawing + (line (pt 0 8)(pt 52 8)) + (line (pt 52 4)(pt 78 4)) + (line (pt 52 12)(pt 78 12)) + (line (pt 52 12)(pt 52 4)) + (line (pt 78 4)(pt 82 8)) + (line (pt 82 8)(pt 78 12)) + (line (pt 78 12)(pt 82 8)) + ) + (annotation_block (location)(rect 2024 -136 2072 -120)) +) +(pin + (output) + (rect 1840 -120 2016 -104) + (text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6))) + (text "AddrDevice_1" (rect 90 0 159 12)(font "Arial" )) + (pt 0 8) + (drawing + (line (pt 0 8)(pt 52 8)) + (line (pt 52 4)(pt 78 4)) + (line (pt 52 12)(pt 78 12)) + (line (pt 52 12)(pt 52 4)) + (line (pt 78 4)(pt 82 8)) + (line (pt 82 8)(pt 78 12)) + (line (pt 78 12)(pt 82 8)) + ) + (annotation_block (location)(rect 2024 -120 2072 -104)) +) +(pin + (output) + (rect 1840 -72 2016 -56) + (text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6))) + (text "RW" (rect 90 0 108 12)(font "Arial" )) + (pt 0 8) + (drawing + (line (pt 0 8)(pt 52 8)) + (line (pt 52 4)(pt 78 4)) + (line (pt 52 12)(pt 78 12)) + (line (pt 52 12)(pt 52 4)) + (line (pt 78 4)(pt 82 8)) + (line (pt 82 8)(pt 78 12)) + (line (pt 78 12)(pt 82 8)) + ) + (annotation_block (location)(rect 2024 -72 2072 -56)) +) +(pin + (output) + (rect 1840 -56 2016 -40) + (text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6))) + (text "Reset" (rect 90 0 119 12)(font "Arial" )) + (pt 0 8) + (drawing + (line (pt 0 8)(pt 52 8)) + (line (pt 52 4)(pt 78 4)) + (line (pt 52 12)(pt 78 12)) + (line (pt 52 12)(pt 52 4)) + (line (pt 78 4)(pt 82 8)) + (line (pt 82 8)(pt 78 12)) + (line (pt 78 12)(pt 82 8)) + ) + (annotation_block (location)(rect 2024 -56 2072 -40)) +) +(pin + (output) + (rect 1840 -40 2016 -24) + (text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6))) + (text "Error0Out" (rect 90 0 137 12)(font "Arial" )) + (pt 0 8) + (drawing + (line (pt 0 8)(pt 52 8)) + (line (pt 52 4)(pt 78 4)) + (line (pt 52 12)(pt 78 12)) + (line (pt 52 12)(pt 52 4)) + (line (pt 78 4)(pt 82 8)) + (line (pt 82 8)(pt 78 12)) + (line (pt 78 12)(pt 82 8)) + ) + (annotation_block (location)(rect 2024 -40 2072 -24)) +) +(pin + (output) + (rect 1840 -88 2016 -72) + (text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6))) + (text "HWPCLK" (rect 90 0 137 12)(font "Arial" )) + (pt 0 8) + (drawing + (line (pt 0 8)(pt 52 8)) + (line (pt 52 4)(pt 78 4)) + (line (pt 52 12)(pt 78 12)) + (line (pt 52 12)(pt 52 4)) + (line (pt 78 4)(pt 82 8)) + (line (pt 82 8)(pt 78 12)) + (line (pt 78 12)(pt 82 8)) + ) + (annotation_block (location)(rect 2024 -88 2072 -72)) +) +(pin + (output) + (rect 1840 -104 2016 -88) + (text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6))) + (text "HWPDATA" (rect 90 0 145 12)(font "Arial" )) + (pt 0 8) + (drawing + (line (pt 0 8)(pt 52 8)) + (line (pt 52 4)(pt 78 4)) + (line (pt 52 12)(pt 78 12)) + (line (pt 52 12)(pt 52 4)) + (line (pt 78 4)(pt 82 8)) + (line (pt 82 8)(pt 78 12)) + (line (pt 78 12)(pt 82 8)) + ) + (annotation_block (location)(rect 2024 -104 2072 -88)) ) (pin (bidir) @@ -573,7 +728,7 @@ applicable agreement for further details. ) ) (symbol - (rect 704 0 824 80) + (rect 1528 -256 1648 -176) (text "LedBlink" (rect 5 0 46 12)(font "Arial" )) (text "inst2" (rect 8 64 31 76)(font "Arial" )) (port @@ -865,7 +1020,7 @@ applicable agreement for further details. (annotation_block (parameter)(rect 1024 696 1408 864)) ) (symbol - (rect 1696 80 1728 112) + (rect 1696 88 1728 120) (text "GND" (rect 8 16 29 26)(font "Arial" (font_size 6))) (text "inst9" (rect 3 21 26 33)(font "Arial" )(invisible)) (port @@ -882,7 +1037,7 @@ applicable agreement for further details. ) ) (symbol - (rect 1728 -136 1760 -120) + (rect 1728 -120 1760 -104) (text "VCC" (rect 7 0 27 10)(font "Arial" (font_size 6))) (text "inst10" (rect 3 5 32 17)(font "Arial" )(invisible)) (port @@ -998,7 +1153,7 @@ applicable agreement for further details. ) ) (symbol - (rect 1696 -136 1728 -120) + (rect 1696 -120 1728 -104) (text "VCC" (rect 7 0 27 10)(font "Arial" (font_size 6))) (text "inst14" (rect 3 5 32 17)(font "Arial" )(invisible)) (port @@ -1572,6 +1727,183 @@ applicable agreement for further details. ) (annotation_block (parameter)(rect 1040 1592 1280 1640)) ) +(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 1040 -144 1368 64) + (text "RAM9X8_Loader" (rect 5 0 85 12)(font "Arial" )) + (text "inst23" (rect 8 192 37 204)(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 "dataInLoader" (rect 0 0 63 12)(font "Arial" )) + (text "dataInLoader" (rect 21 107 84 119)(font "Arial" )) + (line (pt 0 112)(pt 16 112)) + ) + (port + (pt 0 128) + (input) + (text "error" (rect 0 0 22 12)(font "Arial" )) + (text "error" (rect 21 123 43 135)(font "Arial" )) + (line (pt 0 128)(pt 16 128)) + ) + (port + (pt 0 144) + (input) + (text "hwpclk" (rect 0 0 33 12)(font "Arial" )) + (text "hwpclk" (rect 21 139 54 151)(font "Arial" )) + (line (pt 0 144)(pt 16 144)) + ) + (port + (pt 0 160) + (input) + (text "hwpdata" (rect 0 0 40 12)(font "Arial" )) + (text "hwpdata" (rect 21 155 61 167)(font "Arial" )) + (line (pt 0 160)(pt 16 160)) + ) + (port + (pt 0 176) + (input) + (text "pbclk" (rect 0 0 25 12)(font "Arial" )) + (text "pbclk" (rect 21 171 46 183)(font "Arial" )) + (line (pt 0 176)(pt 16 176)) + ) + (port + (pt 328 48) + (output) + (text "addrDevice[3..0]" (rect 0 0 82 12)(font "Arial" )) + (text "addrDevice[3..0]" (rect 238 43 320 55)(font "Arial" )) + (line (pt 328 48)(pt 312 48)(line_width 3)) + ) + (port + (pt 328 64) + (output) + (text "clkLoader" (rect 0 0 47 12)(font "Arial" )) + (text "clkLoader" (rect 268 59 315 71)(font "Arial" )) + (line (pt 328 64)(pt 312 64)) + ) + (port + (pt 328 80) + (output) + (text "rwLoader" (rect 0 0 43 12)(font "Arial" )) + (text "rwLoader" (rect 271 75 314 87)(font "Arial" )) + (line (pt 328 80)(pt 312 80)) + ) + (port + (pt 328 96) + (output) + (text "resetLoader" (rect 0 0 57 12)(font "Arial" )) + (text "resetLoader" (rect 259 91 316 103)(font "Arial" )) + (line (pt 328 96)(pt 312 96)) + ) + (port + (pt 328 112) + (output) + (text "dataOutLoader" (rect 0 0 71 12)(font "Arial" )) + (text "dataOutLoader" (rect 247 107 318 119)(font "Arial" )) + (line (pt 328 112)(pt 312 112)) + ) + (port + (pt 328 128) + (output) + (text "loadMode" (rect 0 0 46 12)(font "Arial" )) + (text "loadMode" (rect 269 123 315 135)(font "Arial" )) + (line (pt 328 128)(pt 312 128)) + ) + (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_LOADER_UPPER_BYTE" + "42" + "" + (type "PARAMETER_SIGNED_DEC") ) + (parameter + "REG_ADDR_LOADER_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 192)) + ) + (annotation_block (parameter)(rect 1024 -216 1336 -144)) +) (connector (pt 488 136) (pt 488 120) @@ -1631,34 +1963,10 @@ applicable agreement for further details. (pt 1040 288) (bus) ) -(connector - (pt 984 272) - (pt 984 304) -) (connector (pt 704 240) (pt 680 240) ) -(connector - (pt 952 240) - (pt 952 336) -) -(connector - (pt 968 256) - (pt 968 320) -) -(connector - (pt 680 240) - (pt 680 -16) -) -(connector - (pt 680 -16) - (pt 936 -16) -) -(connector - (pt 608 32) - (pt 608 136) -) (connector (pt 1040 576) (pt 608 576) @@ -1680,22 +1988,10 @@ applicable agreement for further details. (pt 1040 640) (pt 952 640) ) -(connector - (pt 824 32) - (pt 1840 32) -) (connector (pt 704 256) (pt 544 256) ) -(connector - (pt 856 136) - (pt 936 136) -) -(connector - (pt 936 -16) - (pt 936 136) -) (connector (pt 1368 608) (pt 1592 608) @@ -1760,48 +2056,6 @@ applicable agreement for further details. (pt 1736 488) (pt 1848 488) ) -(connector - (pt 1744 -16) - (pt 1840 -16) - (bus) -) -(connector - (pt 1744 -120) - (pt 1744 -16) - (bus) -) -(connector - (pt 1712 0) - (pt 1840 0) -) -(connector - (pt 1840 16) - (pt 1712 16) -) -(connector - (pt 1712 -120) - (pt 1712 0) -) -(connector - (pt 1712 0) - (pt 1712 16) -) -(connector - (pt 1840 48) - (pt 1712 48) -) -(connector - (pt 1712 64) - (pt 1840 64) -) -(connector - (pt 1712 48) - (pt 1712 64) -) -(connector - (pt 1712 64) - (pt 1712 80) -) (connector (pt 1000 912) (pt 1040 912) @@ -1823,29 +2077,15 @@ applicable agreement for further details. (pt 608 896) (pt 1040 896) ) -(connector - (pt 1848 912) - (pt 1368 912) -) (connector (pt 1848 928) (pt 1368 928) ) -(connector - (pt 1848 944) - (pt 1368 944) - (bus) -) (connector (pt 1848 960) (pt 1368 960) (bus) ) -(connector - (pt 1000 288) - (pt 1000 592) - (bus) -) (connector (pt 984 304) (pt 984 608) @@ -1890,10 +2130,6 @@ applicable agreement for further details. (pt 608 656) (pt 608 896) ) -(connector - (pt 608 32) - (pt 704 32) -) (connector (pt 544 32) (pt 608 32) @@ -2079,7 +2315,245 @@ applicable agreement for further details. (pt 1368 304) (pt 1840 304) ) -(junction (pt 608 32)) +(connector + (pt 680 240) + (pt 680 80) +) +(connector + (pt 856 136) + (pt 880 136) +) +(connector + (pt 680 80) + (pt 880 80) +) +(connector + (pt 880 136) + (pt 880 80) +) +(connector + (pt 608 32) + (pt 608 136) +) +(connector + (pt 1368 912) + (pt 1440 912) +) +(connector + (pt 1472 -96) + (pt 1472 912) +) +(connector + (text "addrdevice[3]" (rect 1730 896 1797 908)(font "Arial" )) + (pt 1848 912) + (pt 1472 912) +) +(connector + (pt 1744 0) + (pt 1840 0) + (bus) +) +(connector + (pt 1744 -104) + (pt 1744 0) + (bus) +) +(connector + (pt 1712 16) + (pt 1840 16) +) +(connector + (pt 1840 32) + (pt 1712 32) +) +(connector + (pt 1712 -104) + (pt 1712 16) +) +(connector + (pt 1712 16) + (pt 1712 32) +) +(connector + (pt 1528 -224) + (pt 608 -224) +) +(connector + (pt 1648 -224) + (pt 1840 -224) +) +(connector + (text "addrdevice[2]" (rect 1778 -144 1845 -132)(font "Arial" )) + (pt 1768 -128) + (pt 1840 -128) +) +(connector + (text "addrdevice[1]" (rect 1778 -128 1845 -116)(font "Arial" )) + (pt 1768 -112) + (pt 1840 -112) +) +(connector + (pt 1768 -128) + (pt 1768 -112) + (bus) +) +(connector + (pt 1768 -112) + (pt 1768 -96) + (bus) +) +(connector + (text "addrdevice[0]" (rect 1778 -112 1845 -100)(font "Arial" )) + (pt 1768 -96) + (pt 1840 -96) +) +(connector + (pt 1840 56) + (pt 1712 56) +) +(connector + (pt 1712 72) + (pt 1840 72) +) +(connector + (pt 1712 56) + (pt 1712 72) +) +(connector + (pt 1712 72) + (pt 1712 88) +) +(connector + (pt 1000 -96) + (pt 1040 -96) + (bus) +) +(connector + (pt 608 -112) + (pt 1040 -112) +) +(connector + (pt 984 -80) + (pt 1040 -80) +) +(connector + (pt 968 -64) + (pt 1040 -64) +) +(connector + (pt 952 -48) + (pt 1040 -48) +) +(connector + (pt 1840 -80) + (pt 1368 -80) +) +(connector + (pt 1840 -64) + (pt 1368 -64) +) +(connector + (pt 1840 -48) + (pt 1368 -48) +) +(connector + (pt 1840 -32) + (pt 1368 -32) +) +(connector + (pt 1840 -16) + (pt 1368 -16) +) +(connector + (pt 608 -224) + (pt 608 -112) +) +(connector + (pt 1000 -96) + (pt 1000 288) + (bus) +) +(connector + (pt 1000 288) + (pt 1000 592) + (bus) +) +(connector + (pt 984 -80) + (pt 984 272) +) +(connector + (pt 984 272) + (pt 984 304) +) +(connector + (pt 968 -64) + (pt 968 256) +) +(connector + (pt 968 256) + (pt 968 320) +) +(connector + (pt 952 -48) + (pt 952 240) +) +(connector + (pt 952 240) + (pt 952 336) +) +(connector + (text "addrDevice[3..0]" (rect 1378 -112 1460 -100)(font "Arial" )) + (pt 1368 -96) + (pt 1472 -96) + (bus) +) +(connector + (pt 1472 -96) + (pt 1768 -96) + (bus) +) +(connector + (pt 1368 944) + (pt 1848 944) + (bus) +) +(connector + (pt 608 -16) + (pt 704 -16) +) +(connector + (pt 608 -112) + (pt 608 -16) +) +(connector + (pt 608 -16) + (pt 608 32) +) +(connector + (pt 1040 -32) + (pt 800 -32) +) +(connector + (pt 544 -32) + (pt 704 -32) +) +(connector + (pt 1040 32) + (pt 1032 32) +) +(connector + (pt 1440 80) + (pt 1032 80) +) +(connector + (pt 1440 912) + (pt 1440 80) +) +(connector + (pt 1032 32) + (pt 1032 80) +) (junction (pt 1000 288)) (junction (pt 984 304)) (junction (pt 968 320)) @@ -2095,8 +2569,6 @@ applicable agreement for further details. (junction (pt 1568 504)) (junction (pt 1544 472)) (junction (pt 608 408)) -(junction (pt 1712 0)) -(junction (pt 1712 64)) (junction (pt 608 976)) (junction (pt 1000 912)) (junction (pt 984 928)) @@ -2108,3 +2580,14 @@ applicable agreement for further details. (junction (pt 984 1464)) (junction (pt 968 1480)) (junction (pt 952 1496)) +(junction (pt 608 32)) +(junction (pt 984 272)) +(junction (pt 968 256)) +(junction (pt 952 240)) +(junction (pt 1712 16)) +(junction (pt 1472 -96)) +(junction (pt 608 -112)) +(junction (pt 1768 -96)) +(junction (pt 1768 -112)) +(junction (pt 1712 72)) +(junction (pt 608 -16)) diff --git a/MainController/MainController.qsf b/MainController/MainController.qsf index 1dcaea5..6b5f1f8 100644 --- a/MainController/MainController.qsf +++ b/MainController/MainController.qsf @@ -284,4 +284,23 @@ set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to AsyncLine set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to DivClk set_location_assignment PIN_70 -to DivClk set_location_assignment PIN_69 -to AsyncLine +set_global_assignment -name VHDL_FILE RAM9X8_Loader.vhd +set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to AddrDevice_1 +set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to AddrDevice_2 +set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to HWPCLK +set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to Error0In +set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to Error0Out +set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to HWPDATA +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 RW +set_location_assignment PIN_50 -to HWPCLK +set_location_assignment PIN_45 -to Error0In +set_location_assignment PIN_41 -to Error0Out +set_location_assignment PIN_12 -to LoadMode +set_location_assignment PIN_65 -to RW +set_location_assignment PIN_64 -to Reset +set_location_assignment PIN_9 -to HWPDATA +set_location_assignment PIN_6 -to AddrDevice_1 +set_location_assignment PIN_5 -to AddrDevice_2 set_instance_assignment -name PARTITION_HIERARCHY root_partition -to | -section_id Top \ No newline at end of file diff --git a/MainController/RAM9X8_Loader.bsf b/MainController/RAM9X8_Loader.bsf new file mode 100644 index 0000000..47741d6 --- /dev/null +++ b/MainController/RAM9X8_Loader.bsf @@ -0,0 +1,169 @@ +/* +WARNING: Do NOT edit the input and output ports in this file in a text +editor if you plan to continue editing the block that represents it in +the Block Editor! File corruption is VERY likely to occur. +*/ +/* +Copyright (C) 1991-2013 Altera Corporation +Your use of Altera Corporation's design tools, logic functions +and other software and tools, and its AMPP partner logic +functions, and any output files from any of the foregoing +(including device programming or simulation files), and any +associated documentation or information are expressly subject +to the terms and conditions of the Altera Program License +Subscription Agreement, Altera MegaCore Function License +Agreement, or other applicable license agreement, including, +without limitation, that your use is for the sole purpose of +programming logic devices manufactured by Altera and sold by +Altera or its authorized distributors. Please refer to the +applicable agreement for further details. +*/ +(header "symbol" (version "1.1")) +(symbol + (rect 16 16 344 224) + (text "RAM9X8_Loader" (rect 5 0 79 12)(font "Arial" )) + (text "inst" (rect 8 192 20 204)(font "Arial" )) + (port + (pt 0 32) + (input) + (text "clk" (rect 0 0 10 12)(font "Arial" )) + (text "clk" (rect 21 27 31 39)(font "Arial" )) + (line (pt 0 32)(pt 16 32)(line_width 1)) + ) + (port + (pt 0 48) + (input) + (text "address[address_bus_width-1..0]" (rect 0 0 129 12)(font "Arial" )) + (text "address[address_bus_width-1..0]" (rect 21 43 150 55)(font "Arial" )) + (line (pt 0 48)(pt 16 48)(line_width 3)) + ) + (port + (pt 0 64) + (input) + (text "we" (rect 0 0 10 12)(font "Arial" )) + (text "we" (rect 21 59 31 71)(font "Arial" )) + (line (pt 0 64)(pt 16 64)(line_width 1)) + ) + (port + (pt 0 80) + (input) + (text "oe" (rect 0 0 9 12)(font "Arial" )) + (text "oe" (rect 21 75 30 87)(font "Arial" )) + (line (pt 0 80)(pt 16 80)(line_width 1)) + ) + (port + (pt 0 96) + (input) + (text "ce" (rect 0 0 9 12)(font "Arial" )) + (text "ce" (rect 21 91 30 103)(font "Arial" )) + (line (pt 0 96)(pt 16 96)(line_width 1)) + ) + (port + (pt 0 112) + (input) + (text "dataInLoader" (rect 0 0 51 12)(font "Arial" )) + (text "dataInLoader" (rect 21 107 72 119)(font "Arial" )) + (line (pt 0 112)(pt 16 112)(line_width 1)) + ) + (port + (pt 0 128) + (input) + (text "error" (rect 0 0 20 12)(font "Arial" )) + (text "error" (rect 21 123 41 135)(font "Arial" )) + (line (pt 0 128)(pt 16 128)(line_width 1)) + ) + (port + (pt 0 144) + (input) + (text "hwpclk" (rect 0 0 25 12)(font "Arial" )) + (text "hwpclk" (rect 21 139 46 151)(font "Arial" )) + (line (pt 0 144)(pt 16 144)(line_width 1)) + ) + (port + (pt 0 160) + (input) + (text "hwpdata" (rect 0 0 31 12)(font "Arial" )) + (text "hwpdata" (rect 21 155 52 167)(font "Arial" )) + (line (pt 0 160)(pt 16 160)(line_width 1)) + ) + (port + (pt 0 176) + (input) + (text "pbclk" (rect 0 0 20 12)(font "Arial" )) + (text "pbclk" (rect 21 171 41 183)(font "Arial" )) + (line (pt 0 176)(pt 16 176)(line_width 1)) + ) + (port + (pt 328 48) + (output) + (text "addrDevice[3..0]" (rect 0 0 66 12)(font "Arial" )) + (text "addrDevice[3..0]" (rect 241 43 307 55)(font "Arial" )) + (line (pt 328 48)(pt 312 48)(line_width 3)) + ) + (port + (pt 328 64) + (output) + (text "clkLoader" (rect 0 0 38 12)(font "Arial" )) + (text "clkLoader" (rect 269 59 307 71)(font "Arial" )) + (line (pt 328 64)(pt 312 64)(line_width 1)) + ) + (port + (pt 328 80) + (output) + (text "rwLoader" (rect 0 0 37 12)(font "Arial" )) + (text "rwLoader" (rect 270 75 307 87)(font "Arial" )) + (line (pt 328 80)(pt 312 80)(line_width 1)) + ) + (port + (pt 328 96) + (output) + (text "resetLoader" (rect 0 0 48 12)(font "Arial" )) + (text "resetLoader" (rect 259 91 307 103)(font "Arial" )) + (line (pt 328 96)(pt 312 96)(line_width 1)) + ) + (port + (pt 328 112) + (output) + (text "dataOutLoader" (rect 0 0 59 12)(font "Arial" )) + (text "dataOutLoader" (rect 248 107 307 119)(font "Arial" )) + (line (pt 328 112)(pt 312 112)(line_width 1)) + ) + (port + (pt 328 128) + (output) + (text "loadMode" (rect 0 0 37 12)(font "Arial" )) + (text "loadMode" (rect 270 123 307 135)(font "Arial" )) + (line (pt 328 128)(pt 312 128)(line_width 1)) + ) + (port + (pt 328 32) + (bidir) + (text "data[data_bus_width-1..0]" (rect 0 0 99 12)(font "Arial" )) + (text "data[data_bus_width-1..0]" (rect 208 27 307 39)(font "Arial" )) + (line (pt 328 32)(pt 312 32)(line_width 3)) + ) + (parameter + "REG_ADDR_LOADER_UPPER_BYTE" + "42" + "" + (type "PARAMETER_SIGNED_DEC") ) + (parameter + "REG_ADDR_LOADER_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 192)(line_width 1)) + ) + (annotation_block (parameter)(rect 344 -64 444 16)) +) diff --git a/MainController/RAM9X8_Loader.vhd b/MainController/RAM9X8_Loader.vhd new file mode 100644 index 0000000..3e28cbf --- /dev/null +++ b/MainController/RAM9X8_Loader.vhd @@ -0,0 +1,118 @@ +library ieee; +use ieee.std_logic_1164.all; +use ieee.std_logic_arith.all; +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; + + DATA_BUS_WIDTH : integer := 8; + ADDRESS_BUS_WIDTH : integer := 9 + ); + + port( + clk : in std_logic; + + data : inout std_logic_vector(DATA_BUS_WIDTH - 1 downto 0); + address : in std_logic_vector(ADDRESS_BUS_WIDTH - 1 downto 0); + we : in std_logic; + oe : in std_logic; + ce : in std_logic; + + addrDevice : out std_logic_vector(3 downto 0) := (others => '0'); + clkLoader : out std_logic := '0'; + rwLoader : out std_logic := '0'; + resetLoader : out std_logic := '0'; + dataOutLoader : out std_logic := '0'; + loadMode : out std_logic := '0'; + + dataInLoader : in std_logic; + error : in std_logic; + hwpclk : in std_logic; + hwpdata : in std_logic; + pbclk : in std_logic + ); +end entity; + +architecture behavorial of RAM9X8_Loader is + +signal loaderBuf : std_logic_vector(15 downto 0) := (others => '1'); +signal sel : std_logic := '0'; + +begin + + process (we, oe, ce) + variable addr : integer range 0 to 2**ADDRESS_BUS_WIDTH - 1 := 0; + begin + if (ce = '0') then -- Если микросхема выбрана + addr := conv_integer(address); + if (addr = REG_ADDR_LOADER_UPPER_BYTE or addr = REG_ADDR_LOADER_LOWER_BYTE) then + if (oe = '0' and we = '1') then -- Если сигнал чтения активен, а записи нет + case addr is + when REG_ADDR_LOADER_UPPER_BYTE => + data(7) <= dataInLoader; + data(6 downto 0) <= loaderBuf(14 downto 8); + when REG_ADDR_LOADER_LOWER_BYTE => + data <= loaderBuf(7 downto 0); + when others => + data <= (others => 'Z'); -- Запретить запись на шину + end case; + elsif (oe = '1' and we = '0') then -- Если сигнал записи активен, а чтения нет + case addr is + when REG_ADDR_LOADER_UPPER_BYTE => + loaderBuf(15 downto 8) <= data; + when REG_ADDR_LOADER_LOWER_BYTE => + loaderBuf(7 downto 0) <= data; + when others => + data <= (others => 'Z'); -- Запретить запись на шину + end case; + else + data <= (others => 'Z'); -- Запретить запись на шину + end if; + else + data <= (others => 'Z'); -- Запретить запись на шину + end if; + else + data <= (others => 'Z'); -- Запретить запись на шину + end if; + end process; + + process(clk) is + begin + if rising_edge(clk) then + loadMode <= loaderBuf(0); + if loaderBuf(4) = '1' and loaderBuf(0) = '1' then + sel <= '0'; + else + sel <= '1'; + end if; + end if; + end process; + + process(clk) is + begin + if rising_edge(clk) then + case sel is + when '0' => + addrDevice(3) <= pbclk; + addrDevice(2) <= '1'; + addrDevice(1) <= '1'; + addrDevice(0) <= hwpdata; + clkLoader <= hwpclk; + dataOutLoader <= error; + rwLoader <= '1'; + resetLoader <= '1'; + when '1' => + addrDevice <= loaderBuf(14 downto 11); + clkLoader <= not loaderBuf(9); + dataOutLoader <= not loaderBuf(7); + rwLoader <= loaderBuf(4); + resetLoader <= loaderBuf(1); + when others => + end case; + end if; + end process; + +end behavorial; \ No newline at end of file