diff --git a/1912062031_XILINX-XC6SLX9-2TQG144I_C415799.pdf b/1912062031_XILINX-XC6SLX9-2TQG144I_C415799.pdf new file mode 100644 index 0000000..09f033a Binary files /dev/null and b/1912062031_XILINX-XC6SLX9-2TQG144I_C415799.pdf differ diff --git a/MainController/MainController.bdf b/MainController/MainController.bdf index 346f1ed..3aa7425 100644 --- a/MainController/MainController.bdf +++ b/MainController/MainController.bdf @@ -21,179 +21,9 @@ applicable agreement for further details. (header "graphic" (version "1.4")) (pin (input) - (rect 376 24 544 40) - (text "INPUT" (rect 125 0 153 10)(font "Arial" (font_size 6))) - (text "FPGA_CLK" (rect 5 0 61 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 24 368 40)) -) -(pin - (input) - (rect 376 264 544 280) - (text "INPUT" (rect 125 0 153 10)(font "Arial" (font_size 6))) - (text "nOE" (rect 5 0 26 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 312 264 368 280)) -) -(pin - (input) - (rect 376 280 544 296) - (text "INPUT" (rect 125 0 153 10)(font "Arial" (font_size 6))) - (text "nWE" (rect 5 0 28 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 312 280 368 296)) -) -(pin - (input) - (rect 376 248 544 264) - (text "INPUT" (rect 125 0 153 10)(font "Arial" (font_size 6))) - (text "nCE" (rect 5 0 26 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 312 248 368 264)) -) -(pin - (input) - (rect 376 584 544 600) - (text "INPUT" (rect 125 0 153 10)(font "Arial" (font_size 6))) - (text "nBL[1..0]" (rect 5 0 49 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 312 584 368 616)) -) -(pin - (input) - (rect 376 296 544 312) - (text "INPUT" (rect 125 0 153 10)(font "Arial" (font_size 6))) - (text "Address[8..0]" (rect 5 0 71 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 312 312 368 440)) -) -(pin - (input) - (rect 376 664 544 680) - (text "INPUT" (rect 125 0 153 10)(font "Arial" (font_size 6))) - (text "SBdatain" (rect 5 0 48 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 664 368 680)) -) -(pin - (input) - (rect 368 984 536 1000) - (text "INPUT" (rect 125 0 153 10)(font "Arial" (font_size 6))) - (text "PBack" (rect 5 0 36 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 312 984 360 1000)) -) -(pin - (input) - (rect 368 1520 536 1536) - (text "INPUT" (rect 125 0 153 10)(font "Arial" (font_size 6))) - (text "PWM[5..0]" (rect 5 0 56 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 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 43 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 - (input) - (rect 368 -288 544 -272) + (rect 376 24 552 40) (text "INPUT" (rect 133 0 161 10)(font "Arial" (font_size 6))) - (text "HWPdatain[1..0]" (rect 5 0 86 12)(font "Arial" )) + (text "FPGA_CLK" (rect 9 0 65 12)(font "Arial" )) (pt 176 8) (drawing (line (pt 92 12)(pt 117 12)) @@ -204,7 +34,177 @@ applicable agreement for further details. (line (pt 117 12)(pt 121 8)) ) (text "VCC" (rect 136 7 156 17)(font "Arial" (font_size 6))) - (annotation_block (location)(rect 320 -288 368 -256)) + (annotation_block (location)(rect 320 24 368 40)) +) +(pin + (input) + (rect 376 264 552 280) + (text "INPUT" (rect 133 0 161 10)(font "Arial" (font_size 6))) + (text "nOE" (rect 9 0 30 12)(font "Arial" )) + (pt 176 8) + (drawing + (line (pt 92 12)(pt 117 12)) + (line (pt 92 4)(pt 117 4)) + (line (pt 121 8)(pt 176 8)) + (line (pt 92 12)(pt 92 4)) + (line (pt 117 4)(pt 121 8)) + (line (pt 117 12)(pt 121 8)) + ) + (text "VCC" (rect 136 7 156 17)(font "Arial" (font_size 6))) + (annotation_block (location)(rect 312 264 368 280)) +) +(pin + (input) + (rect 376 280 552 296) + (text "INPUT" (rect 133 0 161 10)(font "Arial" (font_size 6))) + (text "nWE" (rect 9 0 32 12)(font "Arial" )) + (pt 176 8) + (drawing + (line (pt 92 12)(pt 117 12)) + (line (pt 92 4)(pt 117 4)) + (line (pt 121 8)(pt 176 8)) + (line (pt 92 12)(pt 92 4)) + (line (pt 117 4)(pt 121 8)) + (line (pt 117 12)(pt 121 8)) + ) + (text "VCC" (rect 136 7 156 17)(font "Arial" (font_size 6))) + (annotation_block (location)(rect 312 280 368 296)) +) +(pin + (input) + (rect 376 248 552 264) + (text "INPUT" (rect 133 0 161 10)(font "Arial" (font_size 6))) + (text "nCE" (rect 9 0 30 12)(font "Arial" )) + (pt 176 8) + (drawing + (line (pt 92 12)(pt 117 12)) + (line (pt 92 4)(pt 117 4)) + (line (pt 121 8)(pt 176 8)) + (line (pt 92 12)(pt 92 4)) + (line (pt 117 4)(pt 121 8)) + (line (pt 117 12)(pt 121 8)) + ) + (text "VCC" (rect 136 7 156 17)(font "Arial" (font_size 6))) + (annotation_block (location)(rect 312 248 368 264)) +) +(pin + (input) + (rect 376 584 552 600) + (text "INPUT" (rect 133 0 161 10)(font "Arial" (font_size 6))) + (text "nBL[1..0]" (rect 9 0 53 12)(font "Arial" )) + (pt 176 8) + (drawing + (line (pt 92 12)(pt 117 12)) + (line (pt 92 4)(pt 117 4)) + (line (pt 121 8)(pt 176 8)) + (line (pt 92 12)(pt 92 4)) + (line (pt 117 4)(pt 121 8)) + (line (pt 117 12)(pt 121 8)) + ) + (text "VCC" (rect 136 7 156 17)(font "Arial" (font_size 6))) + (annotation_block (location)(rect 312 584 368 616)) +) +(pin + (input) + (rect 376 296 552 312) + (text "INPUT" (rect 133 0 161 10)(font "Arial" (font_size 6))) + (text "Address[8..0]" (rect 9 0 75 12)(font "Arial" )) + (pt 176 8) + (drawing + (line (pt 92 12)(pt 117 12)) + (line (pt 92 4)(pt 117 4)) + (line (pt 121 8)(pt 176 8)) + (line (pt 92 12)(pt 92 4)) + (line (pt 117 4)(pt 121 8)) + (line (pt 117 12)(pt 121 8)) + ) + (text "VCC" (rect 136 7 156 17)(font "Arial" (font_size 6))) + (annotation_block (location)(rect 312 296 368 424)) +) +(pin + (input) + (rect 376 648 552 664) + (text "INPUT" (rect 133 0 161 10)(font "Arial" (font_size 6))) + (text "SBdatain" (rect 9 0 52 12)(font "Arial" )) + (pt 176 8) + (drawing + (line (pt 92 12)(pt 117 12)) + (line (pt 92 4)(pt 117 4)) + (line (pt 121 8)(pt 176 8)) + (line (pt 92 12)(pt 92 4)) + (line (pt 117 4)(pt 121 8)) + (line (pt 117 12)(pt 121 8)) + ) + (text "VCC" (rect 136 7 156 17)(font "Arial" (font_size 6))) + (annotation_block (location)(rect 320 648 368 664)) +) +(pin + (input) + (rect 368 984 544 1000) + (text "INPUT" (rect 133 0 161 10)(font "Arial" (font_size 6))) + (text "PBack" (rect 9 0 40 12)(font "Arial" )) + (pt 176 8) + (drawing + (line (pt 92 12)(pt 117 12)) + (line (pt 92 4)(pt 117 4)) + (line (pt 121 8)(pt 176 8)) + (line (pt 92 12)(pt 92 4)) + (line (pt 117 4)(pt 121 8)) + (line (pt 117 12)(pt 121 8)) + ) + (text "VCC" (rect 136 7 156 17)(font "Arial" (font_size 6))) + (annotation_block (location)(rect 312 984 360 1000)) +) +(pin + (input) + (rect 368 1520 544 1536) + (text "INPUT" (rect 133 0 161 10)(font "Arial" (font_size 6))) + (text "PWM[5..0]" (rect 9 0 60 12)(font "Arial" )) + (pt 176 8) + (drawing + (line (pt 92 12)(pt 117 12)) + (line (pt 92 4)(pt 117 4)) + (line (pt 121 8)(pt 176 8)) + (line (pt 92 12)(pt 92 4)) + (line (pt 117 4)(pt 121 8)) + (line (pt 117 12)(pt 121 8)) + ) + (text "VCC" (rect 136 7 156 17)(font "Arial" (font_size 6))) + (annotation_block (location)(rect 304 1520 360 1608)) +) +(pin + (input) + (rect 376 -40 552 -24) + (text "INPUT" (rect 133 0 161 10)(font "Arial" (font_size 6))) + (text "Error0In" (rect 9 0 47 12)(font "Arial" )) + (pt 176 8) + (drawing + (line (pt 92 12)(pt 117 12)) + (line (pt 92 4)(pt 117 4)) + (line (pt 121 8)(pt 176 8)) + (line (pt 92 12)(pt 92 4)) + (line (pt 117 4)(pt 121 8)) + (line (pt 117 12)(pt 121 8)) + ) + (text "VCC" (rect 136 7 156 17)(font "Arial" (font_size 6))) + (annotation_block (location)(rect 320 -40 368 -24)) +) +(pin + (input) + (rect 368 -288 544 -272) + (text "INPUT" (rect 133 0 161 10)(font "Arial" (font_size 6))) + (text "HWPdatain[1..0]" (rect 9 0 90 12)(font "Arial" )) + (pt 176 8) + (drawing + (line (pt 92 12)(pt 117 12)) + (line (pt 92 4)(pt 117 4)) + (line (pt 121 8)(pt 176 8)) + (line (pt 92 12)(pt 92 4)) + (line (pt 117 4)(pt 121 8)) + (line (pt 117 12)(pt 121 8)) + ) + (text "VCC" (rect 136 7 156 17)(font "Arial" (font_size 6))) + (annotation_block (location)(rect 312 -288 360 -256)) ) (pin (output) @@ -221,7 +221,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 -152 2080 -136)) + (annotation_block (location)(rect 2024 -152 2072 -136)) ) (pin (output) @@ -238,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 2040 2176 2096 2192)) + (annotation_block (location)(rect 2040 2176 2088 2192)) ) (pin (output) @@ -255,7 +255,7 @@ applicable agreement for further details. (line (pt 82 8)(pt 78 12)) (line (pt 78 12)(pt 82 8)) ) - (annotation_block (location)(rect 2040 2192 2096 2208)) + (annotation_block (location)(rect 2040 2192 2088 2208)) ) (pin (output) @@ -340,11 +340,11 @@ applicable agreement for further details. (line (pt 82 8)(pt 78 12)) (line (pt 78 12)(pt 82 8)) ) - (annotation_block (location)(rect 2080 -64 2136 -8)) + (annotation_block (location)(rect 2088 -8 2136 56)) ) (pin (output) - (rect 1848 480 2024 496) + (rect 1848 464 2024 480) (text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6))) (text "nSBclk" (rect 90 0 124 12)(font "Arial" )) (pt 0 8) @@ -357,11 +357,11 @@ applicable agreement for further details. (line (pt 82 8)(pt 78 12)) (line (pt 78 12)(pt 82 8)) ) - (annotation_block (location)(rect 2032 480 2080 496)) + (annotation_block (location)(rect 2032 464 2080 480)) ) (pin (output) - (rect 1848 464 2024 480) + (rect 1848 480 2024 496) (text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6))) (text "SBclk" (rect 90 0 118 12)(font "Arial" )) (pt 0 8) @@ -374,7 +374,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 464 2080 480)) + (annotation_block (location)(rect 2032 480 2080 496)) ) (pin (output) @@ -476,7 +476,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 1456 2088 1472)) + (annotation_block (location)(rect 2032 1456 2080 1472)) ) (pin (output) @@ -493,7 +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 2096 984 2144 1440)) + (annotation_block (location)(rect 2032 992 2080 1440)) ) (pin (output) @@ -510,7 +510,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)) + (annotation_block (location)(rect 2024 280 2072 296)) ) (pin (output) @@ -527,7 +527,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 312 2064 328)) + (annotation_block (location)(rect 2024 296 2072 312)) ) (pin (output) @@ -680,7 +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)) + (annotation_block (location)(rect 2040 1920 2088 1936)) ) (pin (output) @@ -697,7 +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)) + (annotation_block (location)(rect 2040 1936 2088 1952)) ) (pin (output) @@ -714,7 +714,7 @@ applicable agreement for further details. (line (pt 82 8)(pt 78 12)) (line (pt 78 12)(pt 82 8)) ) - (annotation_block (location)(rect 2104 2192 2160 2208)) + (annotation_block (location)(rect 2040 2208 2088 2224)) ) (pin (output) @@ -731,13 +731,30 @@ applicable agreement for further details. (line (pt 82 8)(pt 78 12)) (line (pt 78 12)(pt 82 8)) ) - (annotation_block (location)(rect 2104 2208 2160 2224)) + (annotation_block (location)(rect 2040 2224 2088 2240)) +) +(pin + (output) + (rect 1856 2280 2032 2296) + (text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6))) + (text "S_RES" (rect 90 0 125 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 2040 2280 2088 2296)) ) (pin (bidir) (rect 1856 2104 2032 2120) (text "BIDIR" (rect 1 0 25 10)(font "Arial" (font_size 6))) - (text "Data[7..0]" (rect 122 0 171 12)(font "Arial" )) + (text "Data[7..0]" (rect 90 0 139 12)(font "Arial" )) (pt 0 8) (drawing (line (pt 56 4)(pt 78 4)) @@ -749,7 +766,7 @@ applicable agreement for further details. (line (pt 52 8)(pt 56 12)) ) (text "VCC" (rect 4 7 24 17)(font "Arial" (font_size 6))) - (annotation_block (location)(rect 2040 1992 2096 2104)) + (annotation_block (location)(rect 2040 1992 2088 2104)) ) (pin (bidir) @@ -767,7 +784,7 @@ applicable agreement for further details. (line (pt 52 8)(pt 56 12)) ) (text "VCC" (rect 4 7 24 17)(font "Arial" (font_size 6))) - (annotation_block (location)(rect 2032 968 2080 1200)) + (annotation_block (location)(rect 2096 968 2144 1192)) ) (symbol (rect 1528 -640 1648 -560) @@ -784,7 +801,7 @@ applicable agreement for further details. (pt 120 32) (output) (text "led" (rect 0 0 14 12)(font "Arial" )) - (text "led" (rect 88 27 102 39)(font "Arial" )) + (text "led" (rect 88 27 99 39)(font "Arial" )) (line (pt 120 32)(pt 104 32)) ) (drawing @@ -869,14 +886,14 @@ applicable agreement for further details. (pt 144 32) (output) (text "output" (rect 0 0 30 12)(font "Arial" )) - (text "output" (rect 98 27 128 39)(font "Arial" )) + (text "output" (rect 98 27 123 39)(font "Arial" )) (line (pt 144 32)(pt 128 32)) ) (port (pt 144 48) (output) (text "noutput" (rect 0 0 36 12)(font "Arial" )) - (text "noutput" (rect 93 43 129 55)(font "Arial" )) + (text "noutput" (rect 93 43 123 55)(font "Arial" )) (line (pt 144 48)(pt 128 48)) ) (drawing @@ -912,14 +929,14 @@ applicable agreement for further details. (pt 144 32) (output) (text "output" (rect 0 0 30 12)(font "Arial" )) - (text "output" (rect 98 27 128 39)(font "Arial" )) + (text "output" (rect 98 27 123 39)(font "Arial" )) (line (pt 144 32)(pt 128 32)) ) (port (pt 144 48) (output) (text "noutput" (rect 0 0 36 12)(font "Arial" )) - (text "noutput" (rect 93 43 129 55)(font "Arial" )) + (text "noutput" (rect 93 43 123 55)(font "Arial" )) (line (pt 144 48)(pt 128 48)) ) (drawing @@ -1115,7 +1132,7 @@ applicable agreement for further details. ) ) (symbol - (rect 920 1480 952 1496) + (rect 856 1480 888 1496) (text "VCC" (rect 7 0 27 10)(font "Arial" (font_size 6))) (text "inst18" (rect 3 5 32 17)(font "Arial" )(invisible)) (port @@ -1318,7 +1335,7 @@ applicable agreement for further details. ) ) (symbol - (rect 1040 544 1368 688) + (rect 1048 544 1376 688) (text "RAM9X8_SerialBusMaster" (rect 5 0 131 12)(font "Arial" )) (text "inst1" (rect 8 128 31 140)(font "Arial" )) (port @@ -1367,14 +1384,14 @@ applicable agreement for further details. (pt 328 48) (output) (text "sbclk" (rect 0 0 25 12)(font "Arial" )) - (text "sbclk" (rect 286 43 311 55)(font "Arial" )) + (text "sbclk" (rect 286 43 307 55)(font "Arial" )) (line (pt 328 48)(pt 312 48)) ) (port (pt 328 64) (output) (text "sbdataout" (rect 0 0 48 12)(font "Arial" )) - (text "sbdataout" (rect 267 59 315 71)(font "Arial" )) + (text "sbdataout" (rect 267 59 307 71)(font "Arial" )) (line (pt 328 64)(pt 312 64)) ) (port @@ -1385,32 +1402,32 @@ applicable agreement for further details. (line (pt 328 32)(pt 312 32)(line_width 3)) ) (parameter - "REG_ADDR_DATA_LOWER_BYTE" + "SB_DATA_LOWER" "0" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_DATA_UPPER_BYTE" + "SB_DATA_UPPER" "1" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_CMD_LOWER_BYTE" + "SB_CMD_LOWER" "2" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_CMD_UPPER_BYTE" + "SB_CMD_UPPER" "3" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_CONTROL_LOWER_BYTE" + "SB_CONTROL_LOWER" "4" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_CONTROL_UPPER_BYTE" + "SB_CONTROL_UPPER" "5" "" (type "PARAMETER_SIGNED_DEC") ) @@ -1427,10 +1444,10 @@ applicable agreement for further details. (drawing (rectangle (rect 16 16 312 128)) ) - (annotation_block (parameter)(rect 1024 416 1344 544)) + (annotation_block (parameter)(rect 1032 416 1272 544)) ) (symbol - (rect 1040 864 1368 1008) + (rect 1048 864 1376 1008) (text "RAM9X8_ParallelBusMaster" (rect 5 0 139 12)(font "Arial" )) (text "inst4" (rect 8 128 31 140)(font "Arial" )) (port @@ -1479,21 +1496,21 @@ applicable agreement for further details. (pt 328 48) (output) (text "pbclk" (rect 0 0 25 12)(font "Arial" )) - (text "pbclk" (rect 286 43 311 55)(font "Arial" )) + (text "pbclk" (rect 286 43 307 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" )) + (text "pbce" (rect 288 59 307 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" )) + (text "pbdir[1..0]" (rect 266 75 307 87)(font "Arial" )) (line (pt 328 80)(pt 312 80)(line_width 3)) ) (port @@ -1511,42 +1528,42 @@ applicable agreement for further details. (line (pt 328 96)(pt 312 96)(line_width 3)) ) (parameter - "REG_ADDR_FIRST_FREE_LOWER_BYTE" + "PB_FIRST_FREE_LOWER" "6" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_FIRST_FREE_UPPER_BYTE" + "PB_FIRST_FREE_UPPER" "7" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_CMD_LOWER_BYTE" + "PB_CMD_LOWER" "8" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_CMD_UPPER_BYTE" + "PB_CMD_UPPER" "9" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_FILL_ADDRESS_SPACE_LOWER_BYTE" + "PB_FILL_ADDRESS_SPACE_LOWER" "10" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_FILL_ADDRESS_SPACE_UPPER_BYTE" + "PB_FILL_ADDRESS_SPACE_UPPER" "11" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_CONTROL_LOWER_BYTE" + "PB_CONTROL_LOWER" "12" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_CONTROL_UPPER_BYTE" + "PB_CONTROL_UPPER" "13" "" (type "PARAMETER_SIGNED_DEC") ) @@ -1568,7 +1585,7 @@ applicable agreement for further details. (drawing (rectangle (rect 16 16 312 128)) ) - (annotation_block (parameter)(rect 1024 696 1408 864)) + (annotation_block (parameter)(rect 1032 696 1344 864)) ) (symbol (rect 1048 1400 1376 1576) @@ -1627,14 +1644,14 @@ applicable agreement for further details. (pt 328 48) (output) (text "tk[31..0]" (rect 0 0 41 12)(font "Arial" )) - (text "tk[31..0]" (rect 273 43 314 55)(font "Arial" )) + (text "tk[31..0]" (rect 273 43 307 55)(font "Arial" )) (line (pt 328 48)(pt 312 48)(line_width 3)) ) (port (pt 328 64) (output) (text "interrupt" (rect 0 0 40 12)(font "Arial" )) - (text "interrupt" (rect 274 59 314 71)(font "Arial" )) + (text "interrupt" (rect 274 59 307 71)(font "Arial" )) (line (pt 328 64)(pt 312 64)) ) (port @@ -1645,122 +1662,122 @@ applicable agreement for further details. (line (pt 328 32)(pt 312 32)(line_width 3)) ) (parameter - "REG_ADDR_MODE_CONTROL_LOWER_BYTE" + "PWM_MODE_CONTROL_LOWER" "14" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_MODE_CONTROL_UPPER_BYTE" + "PWM_MODE_CONTROL_UPPER" "15" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_MASK_2_LOWER_BYTE" + "PWM_MASK_2_LOWER" "16" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_MASK_2_UPPER_BYTE" + "PWM_MASK_2_UPPER" "17" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_MASK_1_LOWER_BYTE" + "PWM_MASK_1_LOWER" "18" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_MASK_1_UPPER_BYTE" + "PWM_MASK_1_UPPER" "19" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_DIRECT_CONTROL_2_LOWER_BYTE" + "PWM_DIRECT_CONTROL_2_LOWER" "20" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_DIRECT_CONTROL_2_UPPER_BYTE" + "PWM_DIRECT_CONTROL_2_UPPER" "21" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_DIRECT_CONTROL_1_LOWER_BYTE" + "PWM_DIRECT_CONTROL_1_LOWER" "22" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_DIRECT_CONTROL_1_UPPER_BYTE" + "PWM_DIRECT_CONTROL_1_UPPER" "23" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_PERIOD_LOWER_BYTE" + "PWM_PERIOD_LOWER" "24" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_PERIOD_UPPER_BYTE" + "PWM_PERIOD_UPPER" "25" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_DIRECTION_2_LOWER_BYTE" + "PWM_DIRECTION_2_LOWER" "26" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_DIRECTION_2_UPPER_BYTE" + "PWM_DIRECTION_2_UPPER" "27" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_DIRECTION_1_LOWER_BYTE" + "PWM_DIRECTION_1_LOWER" "28" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_DIRECTION_1_UPPER_BYTE" + "PWM_DIRECTION_1_UPPER" "29" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_CHANNEL_LOWER_BYTE" + "PWM_CHANNEL_LOWER" "30" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_CHANNEL_UPPER_BYTE" + "PWM_CHANNEL_UPPER" "31" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_TIMING_LOWER_BYTE" + "PWM_TIMING_LOWER" "32" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_TIMING_UPPER_BYTE" + "PWM_TIMING_UPPER" "33" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_CMD_LOWER_BYTE" + "PWM_CMD_LOWER" "34" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_CMD_UPPER_BYTE" + "PWM_CMD_UPPER" "35" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_CONTROL_LOWER_BYTE" + "PWM_CONTROL_LOWER" "36" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_CONTROL_UPPER_BYTE" + "PWM_CONTROL_UPPER" "37" "" (type "PARAMETER_SIGNED_DEC") ) @@ -1777,12 +1794,12 @@ applicable agreement for further details. (drawing (rectangle (rect 16 16 312 160)) ) - (annotation_block (parameter)(rect 1032 1016 1408 1400)) + (annotation_block (parameter)(rect 1032 1016 1344 1400)) ) (symbol - (rect 1040 240 1368 384) - (text "RAM9X8_LedController" (rect 5 0 117 12)(font "Arial" )) - (text "inst15" (rect 8 128 37 140)(font "Arial" )) + (rect 1048 1880 1376 2024) + (text "RAM9X8_OpticalBusMaster" (rect 5 0 138 12)(font "Arial" )) + (text "inst21" (rect 8 128 37 140)(font "Arial" )) (port (pt 0 32) (input) @@ -1818,34 +1835,20 @@ applicable agreement for further details. (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" )) + (text "obclk" (rect 0 0 25 12)(font "Arial" )) + (text "obclk" (rect 286 43 307 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 "obdata" (rect 0 0 33 12)(font "Arial" )) + (text "obdata" (rect 280 59 307 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) @@ -1854,33 +1857,93 @@ applicable agreement for further details. (line (pt 328 32)(pt 312 32)(line_width 3)) ) (parameter - "REG_ADDR_ACTIVE_DEVICE_LOWER_BYTE" - "38" + "OB_CMD_LOWER" + "54" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_ACTIVE_DEVICE_UPPER_BYTE" - "39" + "OB_CMD_UPPER" + "55" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_TEST_LOWER_BYTE" - "40" + "OB_WORD_8_LOWER" + "56" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_TEST_UPPER_BYTE" - "41" + "OB_WORD_8_UPPER" + "57" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_VERSION_LOWER_BYTE" - "42" + "OB_WORD_7_LOWER" + "58" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_VERSION_UPPER_BYTE" - "43" + "OB_WORD_7_UPPER" + "59" + "" + (type "PARAMETER_SIGNED_DEC") ) + (parameter + "OB_WORD_6_LOWER" + "60" + "" + (type "PARAMETER_SIGNED_DEC") ) + (parameter + "OB_WORD_6_UPPER" + "61" + "" + (type "PARAMETER_SIGNED_DEC") ) + (parameter + "OB_WORD_5_LOWER" + "62" + "" + (type "PARAMETER_SIGNED_DEC") ) + (parameter + "OB_WORD_5_UPPER" + "63" + "" + (type "PARAMETER_SIGNED_DEC") ) + (parameter + "OB_WORD_4_LOWER" + "64" + "" + (type "PARAMETER_SIGNED_DEC") ) + (parameter + "OB_WORD_4_UPPER" + "65" + "" + (type "PARAMETER_SIGNED_DEC") ) + (parameter + "OB_WORD_3_LOWER" + "66" + "" + (type "PARAMETER_SIGNED_DEC") ) + (parameter + "OB_WORD_3_UPPER" + "67" + "" + (type "PARAMETER_SIGNED_DEC") ) + (parameter + "OB_WORD_2_LOWER" + "68" + "" + (type "PARAMETER_SIGNED_DEC") ) + (parameter + "OB_WORD_2_UPPER" + "69" + "" + (type "PARAMETER_SIGNED_DEC") ) + (parameter + "OB_WORD_1_LOWER" + "70" + "" + (type "PARAMETER_SIGNED_DEC") ) + (parameter + "OB_WORD_1_UPPER" + "71" "" (type "PARAMETER_SIGNED_DEC") ) (parameter @@ -1896,12 +1959,12 @@ applicable agreement for further details. (drawing (rectangle (rect 16 16 312 128)) ) - (annotation_block (parameter)(rect 1024 112 1376 240)) + (annotation_block (parameter)(rect 1032 1584 1272 1880)) ) (symbol - (rect 1040 -144 1368 64) + (rect 1048 -144 1376 64) (text "RAM9X8_Loader" (rect 5 0 85 12)(font "Arial" )) - (text "inst16" (rect 8 192 37 204)(font "Arial" )) + (text "inst24" (rect 8 192 37 204)(font "Arial" )) (port (pt 0 32) (input) @@ -1976,42 +2039,42 @@ applicable agreement for further details. (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" )) + (text "addrDevice[3..0]" (rect 238 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 47 12)(font "Arial" )) - (text "clkLoader" (rect 268 59 315 71)(font "Arial" )) + (text "clkLoader" (rect 268 59 307 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" )) + (text "rwLoader" (rect 271 75 307 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" )) + (text "resetLoader" (rect 259 91 307 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" )) + (text "dataOutLoader" (rect 247 107 307 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" )) + (text "loadMode" (rect 269 123 307 135)(font "Arial" )) (line (pt 328 128)(pt 312 128)) ) (port @@ -2022,12 +2085,12 @@ applicable agreement for further details. (line (pt 328 32)(pt 312 32)(line_width 3)) ) (parameter - "REG_ADDR_LOADER_LOWER_BYTE" + "LD_LOADER_LOWER" "44" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_LOADER_UPPER_BYTE" + "LD_LOADER_UPPER" "45" "" (type "PARAMETER_SIGNED_DEC") ) @@ -2044,12 +2107,131 @@ applicable agreement for further details. (drawing (rectangle (rect 16 16 312 192)) ) - (annotation_block (parameter)(rect 1024 -216 1336 -144)) + (annotation_block (parameter)(rect 1032 -216 1272 -144)) ) (symbol - (rect 1040 -392 1368 -248) + (rect 1048 240 1376 416) + (text "RAM9X8_Peripheral" (rect 5 0 100 12)(font "Arial" )) + (text "inst27" (rect 8 160 37 172)(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 0 128) + (input) + (text "init" (rect 0 0 14 12)(font "Arial" )) + (text "init" (rect 21 123 35 135)(font "Arial" )) + (line (pt 0 128)(pt 16 128)) + ) + (port + (pt 328 48) + (output) + (text "asyncline" (rect 0 0 47 12)(font "Arial" )) + (text "asyncline" (rect 268 43 307 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 307 71)(font "Arial" )) + (line (pt 328 64)(pt 312 64)) + ) + (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 + "PER_ACTIVE_DEVICE_LOWER" + "38" + "" + (type "PARAMETER_SIGNED_DEC") ) + (parameter + "PER_ACTIVE_DEVICE_UPPER" + "39" + "" + (type "PARAMETER_SIGNED_DEC") ) + (parameter + "PER_REZERVED_1_LOWER" + "40" + "" + (type "PARAMETER_SIGNED_DEC") ) + (parameter + "PER_REZERVED_1_UPPER" + "41" + "" + (type "PARAMETER_SIGNED_DEC") ) + (parameter + "PER_REZERVED_2_LOWER" + "42" + "" + (type "PARAMETER_SIGNED_DEC") ) + (parameter + "PER_REZERVED_2_UPPER" + "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 160)) + ) + (annotation_block (parameter)(rect 1032 112 1312 240)) +) +(symbol + (rect 1048 -392 1376 -248) (text "RAM9X8_HWPBusMaster" (rect 5 0 130 12)(font "Arial" )) - (text "inst19" (rect 8 128 37 140)(font "Arial" )) + (text "inst29" (rect 8 128 37 140)(font "Arial" )) (port (pt 0 32) (input) @@ -2096,14 +2278,14 @@ applicable agreement for further details. (pt 328 48) (output) (text "hwpdataout" (rect 0 0 55 12)(font "Arial" )) - (text "hwpdataout" (rect 261 43 316 55)(font "Arial" )) + (text "hwpdataout" (rect 261 43 307 55)(font "Arial" )) (line (pt 328 48)(pt 312 48)) ) (port (pt 328 64) (output) (text "hwpclk" (rect 0 0 33 12)(font "Arial" )) - (text "hwpclk" (rect 280 59 313 71)(font "Arial" )) + (text "hwpclk" (rect 280 59 307 71)(font "Arial" )) (line (pt 328 64)(pt 312 64)) ) (port @@ -2114,42 +2296,42 @@ applicable agreement for further details. (line (pt 328 32)(pt 312 32)(line_width 3)) ) (parameter - "REG_ADDR_CMD_2_LOWER_BYTE" + "HWP_CMD_2_LOWER" "46" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_CMD_2_UPPER_BYTE" + "HWP_CMD_2_UPPER" "47" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_CMD_1_LOWER_BYTE" + "HWP_CMD_1_LOWER" "48" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_CMD_1_UPPER_BYTE" + "HWP_CMD_1_UPPER" "49" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_DATA_2_LOWER_BYTE" + "HWP_DATA_2_LOWER" "50" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_DATA_2_UPPER_BYTE" + "HWP_DATA_2_UPPER" "51" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_DATA_1_LOWER_BYTE" + "HWP_DATA_1_LOWER" "52" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_DATA_1_UPPER_BYTE" + "HWP_DATA_1_UPPER" "53" "" (type "PARAMETER_SIGNED_DEC") ) @@ -2166,177 +2348,12 @@ applicable agreement for further details. (drawing (rectangle (rect 16 16 312 128)) ) - (annotation_block (parameter)(rect 1024 -552 1336 -392)) + (annotation_block (parameter)(rect 1032 -552 1272 -392)) ) (symbol - (rect 1048 1880 1376 2024) - (text "RAM9X8_OpticalBusMaster" (rect 5 0 138 12)(font "Arial" )) - (text "inst21" (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 328 48) - (output) - (text "obclk" (rect 0 0 25 12)(font "Arial" )) - (text "obclk" (rect 286 43 311 55)(font "Arial" )) - (line (pt 328 48)(pt 312 48)) - ) - (port - (pt 328 64) - (output) - (text "obdata" (rect 0 0 33 12)(font "Arial" )) - (text "obdata" (rect 280 59 313 71)(font "Arial" )) - (line (pt 328 64)(pt 312 64)) - ) - (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_CMD_LOWER_BYTE" - "54" - "" - (type "PARAMETER_SIGNED_DEC") ) - (parameter - "REG_ADDR_CMD_UPPER_BYTE" - "55" - "" - (type "PARAMETER_SIGNED_DEC") ) - (parameter - "REG_ADDR_WORD_8_LOWER_BYTE" - "56" - "" - (type "PARAMETER_SIGNED_DEC") ) - (parameter - "REG_ADDR_WORD_8_UPPER_BYTE" - "57" - "" - (type "PARAMETER_SIGNED_DEC") ) - (parameter - "REG_ADDR_WORD_7_LOWER_BYTE" - "58" - "" - (type "PARAMETER_SIGNED_DEC") ) - (parameter - "REG_ADDR_WORD_7_UPPER_BYTE" - "59" - "" - (type "PARAMETER_SIGNED_DEC") ) - (parameter - "REG_ADDR_WORD_6_LOWER_BYTE" - "60" - "" - (type "PARAMETER_SIGNED_DEC") ) - (parameter - "REG_ADDR_WORD_6_UPPER_BYTE" - "61" - "" - (type "PARAMETER_SIGNED_DEC") ) - (parameter - "REG_ADDR_WORD_5_LOWER_BYTE" - "62" - "" - (type "PARAMETER_SIGNED_DEC") ) - (parameter - "REG_ADDR_WORD_5_UPPER_BYTE" - "63" - "" - (type "PARAMETER_SIGNED_DEC") ) - (parameter - "REG_ADDR_WORD_4_LOWER_BYTE" - "64" - "" - (type "PARAMETER_SIGNED_DEC") ) - (parameter - "REG_ADDR_WORD_4_UPPER_BYTE" - "65" - "" - (type "PARAMETER_SIGNED_DEC") ) - (parameter - "REG_ADDR_WORD_3_LOWER_BYTE" - "66" - "" - (type "PARAMETER_SIGNED_DEC") ) - (parameter - "REG_ADDR_WORD_3_UPPER_BYTE" - "67" - "" - (type "PARAMETER_SIGNED_DEC") ) - (parameter - "REG_ADDR_WORD_2_LOWER_BYTE" - "68" - "" - (type "PARAMETER_SIGNED_DEC") ) - (parameter - "REG_ADDR_WORD_2_UPPER_BYTE" - "69" - "" - (type "PARAMETER_SIGNED_DEC") ) - (parameter - "REG_ADDR_WORD_1_LOWER_BYTE" - "70" - "" - (type "PARAMETER_SIGNED_DEC") ) - (parameter - "REG_ADDR_WORD_1_UPPER_BYTE" - "71" - "" - (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 1032 1584 1344 1880)) -) -(symbol - (rect 1048 2136 1376 2280) - (text "RAM9X8_TEST" (rect 5 0 78 12)(font "Arial" )) - (text "inst23" (rect 8 128 37 140)(font "Arial" )) + (rect 1048 2192 1376 2336) + (text "RAM9X8_Service" (rect 5 0 89 12)(font "Arial" )) + (text "inst16" (rect 8 128 37 140)(font "Arial" )) (port (pt 0 32) (input) @@ -2383,16 +2400,30 @@ applicable agreement for further details. (pt 328 48) (output) (text "leds[3..0]" (rect 0 0 46 12)(font "Arial" )) - (text "leds[3..0]" (rect 269 43 315 55)(font "Arial" )) + (text "leds[3..0]" (rect 269 43 307 55)(font "Arial" )) (line (pt 328 48)(pt 312 48)(line_width 3)) ) (port (pt 328 64) (output) (text "er0_out" (rect 0 0 36 12)(font "Arial" )) - (text "er0_out" (rect 277 59 313 71)(font "Arial" )) + (text "er0_out" (rect 277 59 307 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 307 87)(font "Arial" )) + (line (pt 328 80)(pt 312 80)) + ) + (port + (pt 328 96) + (output) + (text "sres" (rect 0 0 21 12)(font "Arial" )) + (text "sres" (rect 290 91 307 103)(font "Arial" )) + (line (pt 328 96)(pt 312 96)) + ) (port (pt 328 32) (bidir) @@ -2401,25 +2432,45 @@ applicable agreement for further details. (line (pt 328 32)(pt 312 32)(line_width 3)) ) (parameter - "REG_ADDR_TEST_LOWER_BYTE" + "SRV_CONTROL_LOWER" "72" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_TEST_UPPER_BYTE" + "SRV_CONTROL_UPPER" "73" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_LEDS_LOWER_BYTE" + "SRV_LEDS_LOWER" "74" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_LEDS_UPPER_BYTE" + "SRV_LEDS_UPPER" "75" "" (type "PARAMETER_SIGNED_DEC") ) + (parameter + "SRV_INIT_LOWER" + "76" + "" + (type "PARAMETER_SIGNED_DEC") ) + (parameter + "SRV_INIT_UPPER" + "77" + "" + (type "PARAMETER_SIGNED_DEC") ) + (parameter + "SRV_VERSION_LOWER" + "78" + "" + (type "PARAMETER_SIGNED_DEC") ) + (parameter + "SRV_VERSION_UPPER" + "79" + "" + (type "PARAMETER_SIGNED_DEC") ) (parameter "DATA_BUS_WIDTH" "8" @@ -2433,48 +2484,7 @@ applicable agreement for further details. (drawing (rectangle (rect 16 16 312 128)) ) - (annotation_block (parameter)(rect 1032 2032 1328 2136)) -) -(connector - (pt 1040 336) - (pt 952 336) -) -(connector - (pt 1040 320) - (pt 968 320) -) -(connector - (pt 1040 304) - (pt 984 304) -) -(connector - (pt 1040 576) - (pt 608 576) -) -(connector - (pt 1000 592) - (pt 1040 592) - (bus) -) -(connector - (pt 1040 608) - (pt 984 608) -) -(connector - (pt 1040 624) - (pt 968 624) -) -(connector - (pt 1040 640) - (pt 952 640) -) -(connector - (pt 1368 608) - (pt 1592 608) -) -(connector - (pt 1592 504) - (pt 1568 504) + (annotation_block (parameter)(rect 1032 2032 1280 2192)) ) (connector (pt 1592 624) @@ -2484,193 +2494,18 @@ applicable agreement for further details. (pt 1592 592) (pt 1544 592) ) -(connector - (pt 1592 472) - (pt 1544 472) -) -(connector - (pt 1544 408) - (pt 1544 472) -) -(connector - (pt 1544 472) - (pt 1544 592) -) (connector (pt 608 408) (pt 1544 408) ) -(connector - (pt 608 408) - (pt 608 576) -) -(connector - (pt 1592 488) - (pt 1520 488) -) -(connector - (pt 1368 592) - (pt 1520 592) -) -(connector - (pt 1520 592) - (pt 1520 488) -) (connector (pt 1736 592) (pt 1848 592) ) -(connector - (pt 1736 608) - (pt 1848 608) -) -(connector - (pt 1736 472) - (pt 1848 472) -) -(connector - (pt 1736 488) - (pt 1848 488) -) -(connector - (pt 1000 912) - (pt 1040 912) - (bus) -) -(connector - (pt 984 928) - (pt 1040 928) -) -(connector - (pt 968 944) - (pt 1040 944) -) -(connector - (pt 952 960) - (pt 1040 960) -) -(connector - (pt 608 896) - (pt 1040 896) -) -(connector - (pt 1848 928) - (pt 1368 928) -) -(connector - (pt 1848 960) - (pt 1368 960) - (bus) -) -(connector - (pt 984 304) - (pt 984 608) -) -(connector - (pt 968 320) - (pt 968 624) -) -(connector - (pt 952 336) - (pt 952 640) -) -(connector - (pt 608 656) - (pt 712 656) -) -(connector - (pt 1040 656) - (pt 808 656) -) -(connector - (pt 544 672) - (pt 712 672) -) -(connector - (pt 608 576) - (pt 608 656) -) (connector (pt 608 976) (pt 712 976) ) -(connector - (pt 1040 976) - (pt 808 976) -) -(connector - (pt 536 992) - (pt 712 992) -) -(connector - (pt 608 656) - (pt 608 896) -) -(connector - (pt 544 32) - (pt 608 32) -) -(connector - (pt 608 896) - (pt 608 976) -) -(connector - (pt 1000 592) - (pt 1000 912) - (bus) -) -(connector - (pt 984 608) - (pt 984 928) -) -(connector - (pt 968 624) - (pt 968 944) -) -(connector - (pt 952 640) - (pt 952 960) -) -(connector - (pt 1568 504) - (pt 1568 624) -) -(connector - (pt 1568 416) - (pt 1568 504) -) -(connector - (pt 1040 352) - (pt 552 352) -) -(connector - (pt 552 352) - (pt 552 336) -) -(connector - (pt 1040 272) - (pt 1016 272) -) -(connector - (pt 1016 272) - (pt 1016 368) -) -(connector - (pt 1016 368) - (pt 608 368) -) -(connector - (pt 1368 288) - (pt 1840 288) -) -(connector - (pt 1368 304) - (pt 1840 304) -) -(connector - (pt 1368 912) - (pt 1440 912) -) (connector (pt 1472 -96) (pt 1472 912) @@ -2694,10 +2529,6 @@ applicable agreement for further details. (pt 1712 16) (pt 1840 16) ) -(connector - (pt 1840 32) - (pt 1712 32) -) (connector (pt 1712 -104) (pt 1712 16) @@ -2735,185 +2566,20 @@ applicable agreement for further details. (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 -16) - (pt 1368 -16) -) -(connector - (pt 1000 288) - (pt 1000 592) - (bus) -) -(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 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) -) -(connector - (pt 608 -360) - (pt 1040 -360) -) -(connector - (pt 1000 -344) - (pt 1040 -344) - (bus) -) -(connector - (pt 984 -328) - (pt 1040 -328) -) -(connector - (pt 968 -312) - (pt 1040 -312) -) -(connector - (pt 952 -296) - (pt 1040 -296) -) -(connector - (pt 1000 -344) - (pt 1000 -96) - (bus) -) -(connector - (pt 1000 -96) - (pt 1000 288) - (bus) -) -(connector - (pt 984 -328) - (pt 984 -80) -) -(connector - (pt 968 -312) - (pt 968 -64) -) -(connector - (pt 952 -296) - (pt 952 -48) -) -(connector - (pt 1368 -328) - (pt 1384 -328) -) -(connector - (pt 1384 -328) - (pt 1384 -240) -) (connector (pt 1384 -240) (pt 936 -240) ) (connector - (pt 1040 0) - (pt 936 0) -) -(connector - (pt 936 0) - (pt 936 -240) -) -(connector - (pt 1368 -344) - (pt 1400 -344) -) -(connector - (pt 1400 -344) (pt 1400 -224) -) -(connector - (pt 1400 -224) - (pt 920 -224) -) -(connector - (pt 1040 16) - (pt 920 16) -) -(connector - (pt 920 16) (pt 920 -224) ) (connector @@ -2938,12 +2604,6 @@ applicable agreement for further details. (pt 624 -280) (bus) ) -(connector - (text "HWPdata[1..0]" (rect 914 -296 987 -284)(font "Arial" )) - (pt 1040 -280) - (pt 904 -280) - (bus) -) (connector (pt 624 -280) (pt 624 -176) @@ -2963,10 +2623,6 @@ applicable agreement for further details. (pt 624 -176) (pt 704 -176) ) -(connector - (pt 608 -160) - (pt 608 -112) -) (connector (text "HWPdata[1]" (rect 842 -192 902 -180)(font "Arial" )) (pt 800 -176) @@ -2981,10 +2637,6 @@ applicable agreement for further details. (pt 608 -264) (pt 704 -264) ) -(connector - (pt 608 -360) - (pt 608 -264) -) (connector (pt 608 -264) (pt 608 -160) @@ -2998,18 +2650,6 @@ applicable agreement for further details. (pt 608 -16) (pt 608 32) ) -(connector - (pt 608 32) - (pt 608 368) -) -(connector - (pt 608 368) - (pt 608 408) -) -(connector - (pt 1016 192) - (pt 1016 -480) -) (connector (pt 608 -512) (pt 664 -512) @@ -3018,10 +2658,6 @@ applicable agreement for further details. (pt 608 -608) (pt 608 -512) ) -(connector - (pt 608 -512) - (pt 608 -360) -) (connector (pt 928 -480) (pt 1016 -480) @@ -3035,23 +2671,81 @@ applicable agreement for further details. (pt 576 -480) ) (connector - (pt 1368 272) - (pt 1496 272) + (pt 1496 2112) + (pt 1856 2112) (bus) ) +(connector + (pt 608 1512) + (pt 704 1512) +) +(connector + (pt 624 240) + (pt 640 240) +) +(connector + (pt 872 240) + (pt 952 240) +) +(connector + (pt 872 256) + (pt 968 256) +) +(connector + (pt 872 272) + (pt 984 272) +) +(connector + (text "leds[0]" (rect 1794 2168 1827 2180)(font "Arial" )) + (pt 1784 2184) + (pt 1856 2184) +) +(connector + (text "leds[1]" (rect 1794 2184 1827 2196)(font "Arial" )) + (pt 1784 2200) + (pt 1856 2200) +) +(connector + (text "leds[2]" (rect 1794 2200 1827 2212)(font "Arial" )) + (pt 1784 2216) + (pt 1856 2216) +) +(connector + (text "leds[3]" (rect 1794 2216 1827 2228)(font "Arial" )) + (pt 1856 2232) + (pt 1784 2232) +) +(connector + (pt 1840 -32) + (pt 1456 -32) +) (connector (pt 608 1432) (pt 1048 1432) ) +(connector + (pt 1496 1432) + (pt 1376 1432) + (bus) +) (connector (pt 1000 1448) (pt 1048 1448) (bus) ) +(connector + (pt 1848 1448) + (pt 1376 1448) + (bus) +) (connector (pt 984 1464) (pt 1048 1464) ) +(connector + (pt 1848 1464) + (pt 1376 1464) +) (connector (pt 968 1480) (pt 1048 1480) @@ -3060,10 +2754,45 @@ applicable agreement for further details. (pt 952 1496) (pt 1048 1496) ) +(connector + (pt 832 1512) + (pt 1048 1512) + (bus) +) (connector (pt 608 976) (pt 608 1432) ) +(connector + (pt 608 1432) + (pt 608 1512) +) +(connector + (pt 1848 928) + (pt 1376 928) +) +(connector + (pt 1848 960) + (pt 1376 960) + (bus) +) +(connector + (pt 1440 912) + (pt 1376 912) +) +(connector + (pt 1848 944) + (pt 1376 944) + (bus) +) +(connector + (pt 1440 80) + (pt 1440 912) +) +(connector + (pt 608 896) + (pt 608 976) +) (connector (pt 1000 912) (pt 1000 1448) @@ -3073,10 +2802,6 @@ applicable agreement for further details. (pt 984 928) (pt 984 1464) ) -(connector - (pt 1376 1464) - (pt 1848 1464) -) (connector (pt 968 944) (pt 968 1480) @@ -3086,15 +2811,344 @@ applicable agreement for further details. (pt 952 1496) ) (connector - (pt 1376 1448) - (pt 1848 1448) + (pt 608 896) + (pt 1048 896) +) +(connector + (pt 1000 912) + (pt 1048 912) (bus) ) (connector - (pt 1376 1432) + (pt 984 928) + (pt 1048 928) +) +(connector + (pt 968 944) + (pt 1048 944) +) +(connector + (pt 952 960) + (pt 1048 960) +) +(connector + (pt 808 976) + (pt 1048 976) +) +(connector + (pt 1496 576) + (pt 1376 576) + (bus) +) +(connector + (pt 1592 608) + (pt 1376 608) +) +(connector + (pt 1520 592) + (pt 1376 592) +) +(connector + (pt 608 408) + (pt 608 576) +) +(connector + (pt 1000 288) + (pt 1000 592) + (bus) +) +(connector + (pt 1000 592) + (pt 1000 912) + (bus) +) +(connector + (pt 984 608) + (pt 984 928) +) +(connector + (pt 968 624) + (pt 968 944) +) +(connector + (pt 952 640) + (pt 952 960) +) +(connector + (pt 608 576) + (pt 1048 576) +) +(connector + (pt 1000 592) + (pt 1048 592) + (bus) +) +(connector + (pt 984 608) + (pt 1048 608) +) +(connector + (pt 968 624) + (pt 1048 624) +) +(connector + (pt 952 640) + (pt 1048 640) +) +(connector + (pt 808 656) + (pt 1048 656) +) +(connector + (pt 1840 304) + (pt 1376 304) +) +(connector + (pt 552 336) + (pt 552 352) +) +(connector + (pt 1840 288) + (pt 1376 288) +) +(connector + (pt 1496 272) + (pt 1376 272) + (bus) +) +(connector + (pt 872 288) + (pt 1000 288) + (bus) +) +(connector + (pt 984 272) + (pt 984 304) +) +(connector + (pt 984 304) + (pt 984 608) +) +(connector + (pt 968 256) + (pt 968 320) +) +(connector + (pt 968 320) + (pt 968 624) +) +(connector + (pt 952 240) + (pt 952 336) +) +(connector + (pt 952 336) + (pt 952 640) +) +(connector + (pt 1496 272) + (pt 1496 576) + (bus) +) +(connector + (pt 1496 576) (pt 1496 1432) (bus) ) +(connector + (pt 1016 272) + (pt 1048 272) +) +(connector + (pt 1000 288) + (pt 1048 288) + (bus) +) +(connector + (pt 984 304) + (pt 1048 304) +) +(connector + (pt 968 320) + (pt 1048 320) +) +(connector + (pt 952 336) + (pt 1048 336) +) +(connector + (pt 552 352) + (pt 1048 352) +) +(connector + (pt 1840 -80) + (pt 1376 -80) +) +(connector + (pt 1840 -64) + (pt 1376 -64) +) +(connector + (pt 1840 -48) + (pt 1376 -48) +) +(connector + (pt 1840 -16) + (pt 1376 -16) +) +(connector + (pt 1032 80) + (pt 1032 32) +) +(connector + (pt 936 -240) + (pt 936 0) +) +(connector + (pt 920 -224) + (pt 920 16) +) +(connector + (pt 608 -160) + (pt 608 -112) +) +(connector + (pt 608 -112) + (pt 608 -16) +) +(connector + (text "addrDevice[3..0]" (rect 1386 -112 1468 -100)(font "Arial" )) + (pt 1376 -96) + (pt 1472 -96) + (bus) +) +(connector + (pt 1472 -96) + (pt 1768 -96) + (bus) +) +(connector + (pt 608 -112) + (pt 1048 -112) +) +(connector + (pt 1000 -96) + (pt 1048 -96) + (bus) +) +(connector + (pt 984 -80) + (pt 1048 -80) +) +(connector + (pt 968 -64) + (pt 1048 -64) +) +(connector + (pt 952 -48) + (pt 1048 -48) +) +(connector + (pt 936 0) + (pt 1048 0) +) +(connector + (pt 920 16) + (pt 1048 16) +) +(connector + (pt 1032 32) + (pt 1048 32) +) +(connector + (pt 1384 -328) + (pt 1376 -328) +) +(connector + (pt 1384 -240) + (pt 1384 -328) +) +(connector + (pt 1400 -344) + (pt 1376 -344) +) +(connector + (pt 1400 -224) + (pt 1400 -344) +) +(connector + (pt 608 -512) + (pt 608 -360) +) +(connector + (pt 608 -360) + (pt 608 -264) +) +(connector + (pt 1000 -344) + (pt 1000 -96) + (bus) +) +(connector + (pt 1000 -96) + (pt 1000 288) + (bus) +) +(connector + (pt 984 -328) + (pt 984 -80) +) +(connector + (pt 984 -80) + (pt 984 272) +) +(connector + (pt 968 -312) + (pt 968 -64) +) +(connector + (pt 968 -64) + (pt 968 256) +) +(connector + (pt 952 -296) + (pt 952 -48) +) +(connector + (pt 952 -48) + (pt 952 240) +) +(connector + (pt 608 -360) + (pt 1048 -360) +) +(connector + (pt 1000 -344) + (pt 1048 -344) + (bus) +) +(connector + (pt 984 -328) + (pt 1048 -328) +) +(connector + (pt 968 -312) + (pt 1048 -312) +) +(connector + (pt 952 -296) + (pt 1048 -296) +) +(connector + (text "HWPdata[1..0]" (rect 922 -296 995 -284)(font "Arial" )) + (pt 904 -280) + (pt 1048 -280) + (bus) +) +(connector + (pt 608 1912) + (pt 1048 1912) +) (connector (pt 1000 1928) (pt 1048 1928) @@ -3121,220 +3175,258 @@ applicable agreement for further details. (pt 1048 1976) ) (connector - (pt 608 1912) - (pt 1048 1912) + (pt 1016 -480) + (pt 1016 40) ) (connector - (pt 1496 2112) - (pt 1856 2112) - (bus) + (pt 1016 40) + (pt 624 40) ) (connector - (pt 608 1512) - (pt 704 1512) -) -(connector - (pt 536 1528) - (pt 704 1528) - (bus) -) -(connector - (pt 608 1432) - (pt 608 1512) -) -(connector - (pt 832 1512) - (pt 1048 1512) - (bus) + (pt 624 240) + (pt 624 40) ) (connector (pt 1016 192) - (pt 624 192) + (pt 608 192) ) (connector - (pt 544 256) - (pt 640 256) + (pt 1016 192) + (pt 1016 272) ) (connector - (pt 544 272) - (pt 640 272) + (pt 608 32) + (pt 608 192) ) (connector - (pt 544 288) - (pt 640 288) + (pt 608 192) + (pt 608 408) ) (connector - (pt 544 304) - (pt 640 304) + (pt 1784 2184) + (pt 1784 2200) (bus) ) (connector - (pt 624 240) - (pt 640 240) -) -(connector - (pt 624 192) - (pt 624 240) -) -(connector - (pt 952 -48) - (pt 952 240) -) -(connector - (pt 952 240) - (pt 952 336) -) -(connector - (pt 968 -64) - (pt 968 256) -) -(connector - (pt 968 256) - (pt 968 320) -) -(connector - (pt 984 -80) - (pt 984 272) -) -(connector - (pt 984 272) - (pt 984 304) -) -(connector - (pt 1000 288) - (pt 1040 288) - (bus) -) -(connector - (pt 872 240) - (pt 952 240) -) -(connector - (pt 872 256) - (pt 968 256) -) -(connector - (pt 872 272) - (pt 984 272) -) -(connector - (pt 872 288) - (pt 1000 288) + (pt 1784 2200) + (pt 1784 2216) (bus) ) (connector (pt 1048 1528) - (pt 936 1528) + (pt 872 1528) ) (connector - (pt 936 1528) - (pt 936 1496) + (pt 872 1528) + (pt 872 1496) ) (connector - (text "leds[0]" (rect 1794 2168 1827 2180)(font "Arial" )) - (pt 1784 2184) - (pt 1856 2184) + (pt 712 672) + (pt 608 672) ) (connector - (pt 1784 2184) - (pt 1784 2200) + (pt 608 576) + (pt 608 672) +) +(connector + (pt 608 672) + (pt 608 896) +) +(connector + (pt 1736 608) + (pt 1848 608) +) +(connector + (pt 1712 72) + (pt 1840 72) +) +(connector + (pt 1712 56) + (pt 1712 72) +) +(connector + (pt 1712 72) + (pt 1712 88) +) +(connector + (pt 1048 368) + (pt 936 368) +) +(connector + (pt 936 368) + (pt 936 2368) +) +(connector + (pt 1392 2368) + (pt 936 2368) +) +(connector + (pt 536 992) + (pt 544 992) +) +(connector + (pt 544 992) + (pt 712 992) +) +(connector + (pt 544 32) + (pt 552 32) +) +(connector + (pt 552 32) + (pt 608 32) +) +(connector + (pt 544 -32) + (pt 552 -32) +) +(connector + (pt 552 -32) + (pt 704 -32) +) +(connector + (pt 536 1528) + (pt 544 1528) (bus) ) (connector - (text "leds[1]" (rect 1794 2184 1827 2196)(font "Arial" )) - (pt 1784 2200) - (pt 1856 2200) -) -(connector - (text "leds[2]" (rect 1794 2200 1827 2212)(font "Arial" )) - (pt 1784 2216) - (pt 1856 2216) -) -(connector - (pt 1784 2200) - (pt 1784 2216) + (pt 544 1528) + (pt 704 1528) (bus) ) (connector - (pt 1784 2216) - (pt 1784 2232) + (pt 544 256) + (pt 552 256) +) +(connector + (pt 552 256) + (pt 640 256) +) +(connector + (pt 544 272) + (pt 552 272) +) +(connector + (pt 552 272) + (pt 640 272) +) +(connector + (pt 544 288) + (pt 552 288) +) +(connector + (pt 552 288) + (pt 640 288) +) +(connector + (pt 544 304) + (pt 552 304) (bus) ) (connector - (text "leds[3]" (rect 1794 2216 1827 2228)(font "Arial" )) - (pt 1856 2232) - (pt 1784 2232) -) -(connector - (pt 1368 576) - (pt 1496 576) + (pt 552 304) + (pt 640 304) (bus) ) (connector - (pt 1496 272) - (pt 1496 576) - (bus) + (pt 712 656) + (pt 552 656) ) (connector - (pt 1496 576) - (pt 1496 1432) - (bus) + (pt 552 656) + (pt 544 656) ) (connector - (pt 1840 -32) (pt 1456 -32) + (pt 1456 2256) ) (connector - (pt 1456 2200) - (pt 1456 -32) -) -(connector - (pt 1000 2184) - (pt 1048 2184) + (pt 1000 2240) + (pt 1048 2240) (bus) ) (connector - (pt 984 2200) - (pt 1048 2200) + (pt 984 2256) + (pt 1048 2256) ) (connector - (pt 968 2216) - (pt 1048 2216) + (pt 968 2272) + (pt 1048 2272) ) (connector - (pt 952 2232) - (pt 1048 2232) + (pt 952 2288) + (pt 1048 2288) ) (connector - (pt 1496 2168) - (pt 1376 2168) + (pt 1496 2224) + (pt 1376 2224) (bus) ) (connector - (pt 608 2168) - (pt 1048 2168) + (pt 608 2224) + (pt 1048 2224) ) (connector (pt 904 -32) - (pt 904 2248) + (pt 904 2304) ) (connector - (pt 904 2248) - (pt 1048 2248) + (pt 904 2304) + (pt 1048 2304) ) (connector - (text "leds[3..0]" (rect 1386 2168 1432 2180)(font "Arial" )) - (pt 1784 2184) - (pt 1376 2184) + (text "leds[3..0]" (rect 1386 2224 1432 2236)(font "Arial" )) + (pt 1784 2240) + (pt 1376 2240) (bus) ) +(connector + (pt 1456 2256) + (pt 1376 2256) +) +(connector + (pt 1392 2272) + (pt 1376 2272) +) +(connector + (pt 1392 2368) + (pt 1392 2272) +) (connector (pt 800 -32) (pt 904 -32) ) (connector (pt 904 -32) - (pt 1040 -32) + (pt 1048 -32) +) +(connector + (pt 1784 2216) + (pt 1784 2232) + (bus) +) +(connector + (pt 1784 2232) + (pt 1784 2240) + (bus) +) +(connector + (pt 1496 1432) + (pt 1496 2112) + (bus) +) +(connector + (pt 1496 2112) + (pt 1496 2224) + (bus) +) +(connector + (pt 608 1512) + (pt 608 1912) +) +(connector + (pt 608 1912) + (pt 608 2224) ) (connector (pt 1000 1448) @@ -3343,7 +3435,7 @@ applicable agreement for further details. ) (connector (pt 1000 1928) - (pt 1000 2184) + (pt 1000 2240) (bus) ) (connector @@ -3352,7 +3444,7 @@ applicable agreement for further details. ) (connector (pt 984 1944) - (pt 984 2200) + (pt 984 2256) ) (connector (pt 968 1480) @@ -3360,7 +3452,7 @@ applicable agreement for further details. ) (connector (pt 968 1960) - (pt 968 2216) + (pt 968 2272) ) (connector (pt 952 1496) @@ -3368,36 +3460,61 @@ applicable agreement for further details. ) (connector (pt 952 1976) - (pt 952 2232) + (pt 952 2288) ) (connector - (pt 1496 1432) - (pt 1496 2112) - (bus) + (pt 1712 32) + (pt 1840 32) ) (connector - (pt 1496 2112) - (pt 1496 2168) - (bus) + (pt 1376 2288) + (pt 1856 2288) ) (connector - (pt 608 1512) - (pt 608 1912) + (pt 1544 472) + (pt 1592 472) ) (connector - (pt 608 1912) - (pt 608 2168) + (pt 1568 504) + (pt 1592 504) ) (connector - (pt 1376 2200) - (pt 1456 2200) + (pt 1520 488) + (pt 1592 488) +) +(connector + (pt 1520 592) + (pt 1520 488) +) +(connector + (pt 1544 408) + (pt 1544 472) +) +(connector + (pt 1544 472) + (pt 1544 592) +) +(connector + (pt 1568 416) + (pt 1568 504) +) +(connector + (pt 1568 504) + (pt 1568 624) +) +(connector + (pt 1736 472) + (pt 1848 472) +) +(connector + (pt 1736 488) + (pt 1848 488) ) (junction (pt 1000 288)) (junction (pt 984 304)) (junction (pt 968 320)) (junction (pt 952 336)) (junction (pt 608 576)) -(junction (pt 608 656)) (junction (pt 1000 592)) (junction (pt 984 608)) (junction (pt 968 624)) @@ -3411,7 +3528,6 @@ applicable agreement for further details. (junction (pt 984 928)) (junction (pt 968 944)) (junction (pt 952 960)) -(junction (pt 608 368)) (junction (pt 608 32)) (junction (pt 984 272)) (junction (pt 968 256)) @@ -3447,7 +3563,18 @@ applicable agreement for further details. (junction (pt 1496 2112)) (junction (pt 608 1912)) (junction (pt 904 -32)) -(junction (pt 1784 2184)) (junction (pt 1784 2200)) (junction (pt 1784 2216)) (junction (pt 1496 576)) +(junction (pt 608 192)) +(junction (pt 1784 2232)) +(junction (pt 608 672)) +(junction (pt 544 992)) +(junction (pt 552 32)) +(junction (pt 552 -32)) +(junction (pt 544 1528)) +(junction (pt 552 256)) +(junction (pt 552 272)) +(junction (pt 552 288)) +(junction (pt 552 304)) +(junction (pt 552 656)) diff --git a/MainController/MainController.bsf b/MainController/MainController.bsf new file mode 100644 index 0000000..1334f21 --- /dev/null +++ b/MainController/MainController.bsf @@ -0,0 +1,337 @@ +/* +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.2")) +(symbol + (rect 16 16 240 592) + (text "MainController" (rect 5 0 85 14)(font "Arial" (font_size 8))) + (text "inst" (rect 8 560 25 572)(font "Arial" )) + (port + (pt 0 32) + (input) + (text "HWPdatain[1..0]" (rect 0 0 89 14)(font "Arial" (font_size 8))) + (text "HWPdatain[1..0]" (rect 21 27 110 41)(font "Arial" (font_size 8))) + (line (pt 0 32)(pt 16 32)(line_width 3)) + ) + (port + (pt 0 48) + (input) + (text "Error0In" (rect 0 0 44 14)(font "Arial" (font_size 8))) + (text "Error0In" (rect 21 43 65 57)(font "Arial" (font_size 8))) + (line (pt 0 48)(pt 16 48)) + ) + (port + (pt 0 64) + (input) + (text "FPGA_CLK" (rect 0 0 63 14)(font "Arial" (font_size 8))) + (text "FPGA_CLK" (rect 21 59 84 73)(font "Arial" (font_size 8))) + (line (pt 0 64)(pt 16 64)) + ) + (port + (pt 0 80) + (input) + (text "nCE" (rect 0 0 22 14)(font "Arial" (font_size 8))) + (text "nCE" (rect 21 75 43 89)(font "Arial" (font_size 8))) + (line (pt 0 80)(pt 16 80)) + ) + (port + (pt 0 96) + (input) + (text "nOE" (rect 0 0 23 14)(font "Arial" (font_size 8))) + (text "nOE" (rect 21 91 44 105)(font "Arial" (font_size 8))) + (line (pt 0 96)(pt 16 96)) + ) + (port + (pt 0 112) + (input) + (text "nWE" (rect 0 0 25 14)(font "Arial" (font_size 8))) + (text "nWE" (rect 21 107 46 121)(font "Arial" (font_size 8))) + (line (pt 0 112)(pt 16 112)) + ) + (port + (pt 0 128) + (input) + (text "Address[8..0]" (rect 0 0 77 14)(font "Arial" (font_size 8))) + (text "Address[8..0]" (rect 21 123 98 137)(font "Arial" (font_size 8))) + (line (pt 0 128)(pt 16 128)(line_width 3)) + ) + (port + (pt 0 144) + (input) + (text "nBL[1..0]" (rect 0 0 50 14)(font "Arial" (font_size 8))) + (text "nBL[1..0]" (rect 21 139 71 153)(font "Arial" (font_size 8))) + (line (pt 0 144)(pt 16 144)(line_width 3)) + ) + (port + (pt 0 160) + (input) + (text "SBdatain" (rect 0 0 50 14)(font "Arial" (font_size 8))) + (text "SBdatain" (rect 21 155 71 169)(font "Arial" (font_size 8))) + (line (pt 0 160)(pt 16 160)) + ) + (port + (pt 0 176) + (input) + (text "PBack" (rect 0 0 35 14)(font "Arial" (font_size 8))) + (text "PBack" (rect 21 171 56 185)(font "Arial" (font_size 8))) + (line (pt 0 176)(pt 16 176)) + ) + (port + (pt 0 192) + (input) + (text "PWM[5..0]" (rect 0 0 56 14)(font "Arial" (font_size 8))) + (text "PWM[5..0]" (rect 21 187 77 201)(font "Arial" (font_size 8))) + (line (pt 0 192)(pt 16 192)(line_width 3)) + ) + (port + (pt 224 32) + (output) + (text "FPGA_LED_1" (rect 0 0 76 14)(font "Arial" (font_size 8))) + (text "FPGA_LED_1" (rect 127 27 203 41)(font "Arial" (font_size 8))) + (line (pt 224 32)(pt 208 32)) + ) + (port + (pt 224 48) + (output) + (text "AddrDevice_2" (rect 0 0 81 14)(font "Arial" (font_size 8))) + (text "AddrDevice_2" (rect 122 43 203 57)(font "Arial" (font_size 8))) + (line (pt 224 48)(pt 208 48)) + ) + (port + (pt 224 64) + (output) + (text "AddrDevice_1" (rect 0 0 81 14)(font "Arial" (font_size 8))) + (text "AddrDevice_1" (rect 122 59 203 73)(font "Arial" (font_size 8))) + (line (pt 224 64)(pt 208 64)) + ) + (port + (pt 224 80) + (output) + (text "HWPDATA" (rect 0 0 61 14)(font "Arial" (font_size 8))) + (text "HWPDATA" (rect 142 75 203 89)(font "Arial" (font_size 8))) + (line (pt 224 80)(pt 208 80)) + ) + (port + (pt 224 96) + (output) + (text "HWPCLK" (rect 0 0 50 14)(font "Arial" (font_size 8))) + (text "HWPCLK" (rect 153 91 203 105)(font "Arial" (font_size 8))) + (line (pt 224 96)(pt 208 96)) + ) + (port + (pt 224 112) + (output) + (text "RW" (rect 0 0 20 14)(font "Arial" (font_size 8))) + (text "RW" (rect 183 107 203 121)(font "Arial" (font_size 8))) + (line (pt 224 112)(pt 208 112)) + ) + (port + (pt 224 128) + (output) + (text "Reset" (rect 0 0 33 14)(font "Arial" (font_size 8))) + (text "Reset" (rect 170 123 203 137)(font "Arial" (font_size 8))) + (line (pt 224 128)(pt 208 128)) + ) + (port + (pt 224 144) + (output) + (text "Error0Out" (rect 0 0 55 14)(font "Arial" (font_size 8))) + (text "Error0Out" (rect 148 139 203 153)(font "Arial" (font_size 8))) + (line (pt 224 144)(pt 208 144)) + ) + (port + (pt 224 160) + (output) + (text "LoadMode" (rect 0 0 59 14)(font "Arial" (font_size 8))) + (text "LoadMode" (rect 144 155 203 169)(font "Arial" (font_size 8))) + (line (pt 224 160)(pt 208 160)) + ) + (port + (pt 224 176) + (output) + (text "TKdir[3..0]" (rect 0 0 57 14)(font "Arial" (font_size 8))) + (text "TKdir[3..0]" (rect 146 171 203 185)(font "Arial" (font_size 8))) + (line (pt 224 176)(pt 208 176)(line_width 3)) + ) + (port + (pt 224 192) + (output) + (text "DIR7" (rect 0 0 25 14)(font "Arial" (font_size 8))) + (text "DIR7" (rect 178 187 203 201)(font "Arial" (font_size 8))) + (line (pt 224 192)(pt 208 192)) + ) + (port + (pt 224 208) + (output) + (text "DIR8" (rect 0 0 25 14)(font "Arial" (font_size 8))) + (text "DIR8" (rect 178 203 203 217)(font "Arial" (font_size 8))) + (line (pt 224 208)(pt 208 208)) + ) + (port + (pt 224 224) + (output) + (text "DIR9" (rect 0 0 25 14)(font "Arial" (font_size 8))) + (text "DIR9" (rect 178 219 203 233)(font "Arial" (font_size 8))) + (line (pt 224 224)(pt 208 224)) + ) + (port + (pt 224 240) + (output) + (text "DIRen" (rect 0 0 33 14)(font "Arial" (font_size 8))) + (text "DIRen" (rect 170 235 203 249)(font "Arial" (font_size 8))) + (line (pt 224 240)(pt 208 240)) + ) + (port + (pt 224 256) + (output) + (text "AsyncLine" (rect 0 0 61 14)(font "Arial" (font_size 8))) + (text "AsyncLine" (rect 142 251 203 265)(font "Arial" (font_size 8))) + (line (pt 224 256)(pt 208 256)) + ) + (port + (pt 224 272) + (output) + (text "DivClk" (rect 0 0 34 14)(font "Arial" (font_size 8))) + (text "DivClk" (rect 169 267 203 281)(font "Arial" (font_size 8))) + (line (pt 224 272)(pt 208 272)) + ) + (port + (pt 224 288) + (output) + (text "SBclk" (rect 0 0 31 14)(font "Arial" (font_size 8))) + (text "SBclk" (rect 172 283 203 297)(font "Arial" (font_size 8))) + (line (pt 224 288)(pt 208 288)) + ) + (port + (pt 224 304) + (output) + (text "nSBclk" (rect 0 0 38 14)(font "Arial" (font_size 8))) + (text "nSBclk" (rect 165 299 203 313)(font "Arial" (font_size 8))) + (line (pt 224 304)(pt 208 304)) + ) + (port + (pt 224 320) + (output) + (text "SBdataout" (rect 0 0 59 14)(font "Arial" (font_size 8))) + (text "SBdataout" (rect 144 315 203 329)(font "Arial" (font_size 8))) + (line (pt 224 320)(pt 208 320)) + ) + (port + (pt 224 336) + (output) + (text "nSBdataout" (rect 0 0 66 14)(font "Arial" (font_size 8))) + (text "nSBdataout" (rect 137 331 203 345)(font "Arial" (font_size 8))) + (line (pt 224 336)(pt 208 336)) + ) + (port + (pt 224 352) + (output) + (text "PBclk" (rect 0 0 30 14)(font "Arial" (font_size 8))) + (text "PBclk" (rect 173 347 203 361)(font "Arial" (font_size 8))) + (line (pt 224 352)(pt 208 352)) + ) + (port + (pt 224 368) + (output) + (text "PBce" (rect 0 0 29 14)(font "Arial" (font_size 8))) + (text "PBce" (rect 174 363 203 377)(font "Arial" (font_size 8))) + (line (pt 224 368)(pt 208 368)) + ) + (port + (pt 224 384) + (output) + (text "PBdir[1..0]" (rect 0 0 57 14)(font "Arial" (font_size 8))) + (text "PBdir[1..0]" (rect 146 379 203 393)(font "Arial" (font_size 8))) + (line (pt 224 384)(pt 208 384)(line_width 3)) + ) + (port + (pt 224 416) + (output) + (text "TK[31..0]" (rect 0 0 50 14)(font "Arial" (font_size 8))) + (text "TK[31..0]" (rect 153 411 203 425)(font "Arial" (font_size 8))) + (line (pt 224 416)(pt 208 416)(line_width 3)) + ) + (port + (pt 224 432) + (output) + (text "Interrupt" (rect 0 0 47 14)(font "Arial" (font_size 8))) + (text "Interrupt" (rect 156 427 203 441)(font "Arial" (font_size 8))) + (line (pt 224 432)(pt 208 432)) + ) + (port + (pt 224 448) + (output) + (text "OBclk" (rect 0 0 33 14)(font "Arial" (font_size 8))) + (text "OBclk" (rect 170 443 203 457)(font "Arial" (font_size 8))) + (line (pt 224 448)(pt 208 448)) + ) + (port + (pt 224 464) + (output) + (text "OBdata" (rect 0 0 42 14)(font "Arial" (font_size 8))) + (text "OBdata" (rect 161 459 203 473)(font "Arial" (font_size 8))) + (line (pt 224 464)(pt 208 464)) + ) + (port + (pt 224 496) + (output) + (text "FPGA_LED_2" (rect 0 0 76 14)(font "Arial" (font_size 8))) + (text "FPGA_LED_2" (rect 127 491 203 505)(font "Arial" (font_size 8))) + (line (pt 224 496)(pt 208 496)) + ) + (port + (pt 224 512) + (output) + (text "FPGA_LED_3" (rect 0 0 76 14)(font "Arial" (font_size 8))) + (text "FPGA_LED_3" (rect 127 507 203 521)(font "Arial" (font_size 8))) + (line (pt 224 512)(pt 208 512)) + ) + (port + (pt 224 528) + (output) + (text "FPGA_LED_4" (rect 0 0 76 14)(font "Arial" (font_size 8))) + (text "FPGA_LED_4" (rect 127 523 203 537)(font "Arial" (font_size 8))) + (line (pt 224 528)(pt 208 528)) + ) + (port + (pt 224 544) + (output) + (text "FPGA_LED_5" (rect 0 0 76 14)(font "Arial" (font_size 8))) + (text "FPGA_LED_5" (rect 127 539 203 553)(font "Arial" (font_size 8))) + (line (pt 224 544)(pt 208 544)) + ) + (port + (pt 224 400) + (bidir) + (text "PBdata[15..0]" (rect 0 0 75 14)(font "Arial" (font_size 8))) + (text "PBdata[15..0]" (rect 128 395 203 409)(font "Arial" (font_size 8))) + (line (pt 224 400)(pt 208 400)(line_width 3)) + ) + (port + (pt 224 480) + (bidir) + (text "Data[7..0]" (rect 0 0 54 14)(font "Arial" (font_size 8))) + (text "Data[7..0]" (rect 149 475 203 489)(font "Arial" (font_size 8))) + (line (pt 224 480)(pt 208 480)(line_width 3)) + ) + (drawing + (rectangle (rect 16 16 208 560)) + ) +) diff --git a/MainController/MainController.qsf b/MainController/MainController.qsf index 28a9805..deb6374 100644 --- a/MainController/MainController.qsf +++ b/MainController/MainController.qsf @@ -318,4 +318,8 @@ set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to FPGA_LED_4 set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to FPGA_LED_5 set_location_assignment PIN_169 -to FPGA_LED_4 set_location_assignment PIN_171 -to FPGA_LED_5 +set_global_assignment -name VHDL_FILE RAM9X8_Peripheral.vhd +set_global_assignment -name VHDL_FILE RAM9X8_Service.vhd +set_location_assignment PIN_43 -to S_RES +set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to S_RES set_instance_assignment -name PARTITION_HIERARCHY root_partition -to | -section_id Top \ No newline at end of file diff --git a/MainController/RAM9X8_HWPBusMaster.bsf b/MainController/RAM9X8_HWPBusMaster.bsf index 369530a..97a2c5e 100644 --- a/MainController/RAM9X8_HWPBusMaster.bsf +++ b/MainController/RAM9X8_HWPBusMaster.bsf @@ -87,42 +87,42 @@ applicable agreement for further details. (line (pt 328 32)(pt 312 32)(line_width 3)) ) (parameter - "REG_ADDR_CMD_2_LOWER_BYTE" + "HWP_CMD_2_LOWER" "46" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_CMD_2_UPPER_BYTE" + "HWP_CMD_2_UPPER" "47" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_CMD_1_LOWER_BYTE" + "HWP_CMD_1_LOWER" "48" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_CMD_1_UPPER_BYTE" + "HWP_CMD_1_UPPER" "49" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_DATA_2_LOWER_BYTE" + "HWP_DATA_2_LOWER" "50" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_DATA_2_UPPER_BYTE" + "HWP_DATA_2_UPPER" "51" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_DATA_1_LOWER_BYTE" + "HWP_DATA_1_LOWER" "52" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_DATA_1_UPPER_BYTE" + "HWP_DATA_1_UPPER" "53" "" (type "PARAMETER_SIGNED_DEC") ) diff --git a/MainController/RAM9X8_HWPBusMaster.vhd b/MainController/RAM9X8_HWPBusMaster.vhd index 039e39f..bea6587 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_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; + HWP_CMD_2_LOWER : integer := 46; + HWP_CMD_2_UPPER : integer := 47; + HWP_CMD_1_LOWER : integer := 48; + HWP_CMD_1_UPPER : integer := 49; + HWP_DATA_2_LOWER : integer := 50; + HWP_DATA_2_UPPER : integer := 51; + HWP_DATA_1_LOWER : integer := 52; + HWP_DATA_1_UPPER : integer := 53; DATA_BUS_WIDTH : integer := 8; ADDRESS_BUS_WIDTH : integer := 9 @@ -52,26 +52,26 @@ begin begin if (ce = '0') then -- Если микросхема выбрана addr := conv_integer(address); - if (addr = REG_ADDR_CMD_2_UPPER_BYTE or addr = REG_ADDR_CMD_2_LOWER_BYTE or addr = REG_ADDR_CMD_1_UPPER_BYTE or addr = REG_ADDR_CMD_1_LOWER_BYTE - or addr = REG_ADDR_DATA_2_UPPER_BYTE or addr = REG_ADDR_DATA_2_LOWER_BYTE or addr = REG_ADDR_DATA_1_UPPER_BYTE or addr = REG_ADDR_DATA_1_LOWER_BYTE) then + if (addr = HWP_CMD_2_UPPER or addr = HWP_CMD_2_LOWER or addr = HWP_CMD_1_UPPER or addr = HWP_CMD_1_LOWER + or addr = HWP_DATA_2_UPPER or addr = HWP_DATA_2_LOWER or addr = HWP_DATA_1_UPPER or addr = HWP_DATA_1_LOWER) then if (oe = '0' and we = '1') then -- Если сигнал чтения активен, а записи нет case addr is - when REG_ADDR_CMD_2_UPPER_BYTE => + when HWP_CMD_2_UPPER => data <= cmdBuf(31 downto 24); - when REG_ADDR_CMD_2_LOWER_BYTE => + when HWP_CMD_2_LOWER => data <= cmdBuf(23 downto 16); - when REG_ADDR_CMD_1_UPPER_BYTE => + when HWP_CMD_1_UPPER => data <= cmdBuf(15 downto 8); - when REG_ADDR_CMD_1_LOWER_BYTE => + when HWP_CMD_1_LOWER => data(7 downto 1) <= cmdBuf(7 downto 1); data(0) <= done; - when REG_ADDR_DATA_2_UPPER_BYTE => + when HWP_DATA_2_UPPER => data <= tempBuf(29 downto 22); - when REG_ADDR_DATA_2_LOWER_BYTE => + when HWP_DATA_2_LOWER => data <= tempBuf(21 downto 14); - when REG_ADDR_DATA_1_UPPER_BYTE => + when HWP_DATA_1_UPPER => data <= tempBuf(13 downto 6); - when REG_ADDR_DATA_1_LOWER_BYTE => + when HWP_DATA_1_LOWER => data(7 downto 2) <= tempBuf(5 downto 0); data(1 downto 0) <= (others => '0'); when others => @@ -79,21 +79,21 @@ begin end case; elsif (oe = '1' and we = '0') then -- Если сигнал записи активен, а чтения нет case addr is - when REG_ADDR_CMD_2_UPPER_BYTE => + when HWP_CMD_2_UPPER => cmdBuf(31 downto 24) <= data; - when REG_ADDR_CMD_2_LOWER_BYTE => + when HWP_CMD_2_LOWER => cmdBuf(23 downto 16) <= data; - when REG_ADDR_CMD_1_UPPER_BYTE => + when HWP_CMD_1_UPPER => cmdBuf(15 downto 8) <= data; - when REG_ADDR_CMD_1_LOWER_BYTE => + when HWP_CMD_1_LOWER => cmdBuf(7 downto 0) <= data; - when REG_ADDR_DATA_2_UPPER_BYTE => + when HWP_DATA_2_UPPER => dataBuf(31 downto 24) <= data; - when REG_ADDR_DATA_2_LOWER_BYTE => + when HWP_DATA_2_LOWER => dataBuf(23 downto 16) <= data; - when REG_ADDR_DATA_1_UPPER_BYTE => + when HWP_DATA_1_UPPER => dataBuf(15 downto 8) <= data; - when REG_ADDR_DATA_1_LOWER_BYTE => + when HWP_DATA_1_LOWER => dataBuf(7 downto 0) <= data; when others => data <= (others => 'Z'); -- Запретить запись на шину diff --git a/MainController/RAM9X8_Loader.bsf b/MainController/RAM9X8_Loader.bsf index 540094f..e3d6f1a 100644 --- a/MainController/RAM9X8_Loader.bsf +++ b/MainController/RAM9X8_Loader.bsf @@ -143,12 +143,12 @@ applicable agreement for further details. (line (pt 328 32)(pt 312 32)(line_width 3)) ) (parameter - "REG_ADDR_LOADER_LOWER_BYTE" + "LD_LOADER_LOWER" "44" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_LOADER_UPPER_BYTE" + "LD_LOADER_UPPER" "45" "" (type "PARAMETER_SIGNED_DEC") ) diff --git a/MainController/RAM9X8_Loader.vhd b/MainController/RAM9X8_Loader.vhd index 288e8bb..dbd3bf6 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_LOWER_BYTE : integer := 44; - REG_ADDR_LOADER_UPPER_BYTE : integer := 45; + LD_LOADER_LOWER : integer := 44; + LD_LOADER_UPPER : integer := 45; DATA_BUS_WIDTH : integer := 8; ADDRESS_BUS_WIDTH : integer := 9 @@ -48,22 +48,22 @@ begin 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 (addr = LD_LOADER_UPPER or addr = LD_LOADER_LOWER) then if (oe = '0' and we = '1') then -- Если сигнал чтения активен, а записи нет case addr is - when REG_ADDR_LOADER_UPPER_BYTE => + when LD_LOADER_UPPER => data(7) <= dataInLoader; data(6 downto 0) <= loaderBuf(14 downto 8); - when REG_ADDR_LOADER_LOWER_BYTE => + when LD_LOADER_LOWER => 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 => + when LD_LOADER_UPPER => loaderBuf(15 downto 8) <= data; - when REG_ADDR_LOADER_LOWER_BYTE => + when LD_LOADER_LOWER => loaderBuf(7 downto 0) <= data; when others => data <= (others => 'Z'); -- Запретить запись на шину diff --git a/MainController/RAM9X8_OpticalBusMaster.bsf b/MainController/RAM9X8_OpticalBusMaster.bsf index 4b04af0..85635d9 100644 --- a/MainController/RAM9X8_OpticalBusMaster.bsf +++ b/MainController/RAM9X8_OpticalBusMaster.bsf @@ -80,92 +80,92 @@ applicable agreement for further details. (line (pt 328 32)(pt 312 32)(line_width 3)) ) (parameter - "REG_ADDR_CMD_LOWER_BYTE" + "OB_CMD_LOWER" "54" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_CMD_UPPER_BYTE" + "OB_CMD_UPPER" "55" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_WORD_8_LOWER_BYTE" + "OB_WORD_8_LOWER" "56" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_WORD_8_UPPER_BYTE" + "OB_WORD_8_UPPER" "57" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_WORD_7_LOWER_BYTE" + "OB_WORD_7_LOWER" "58" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_WORD_7_UPPER_BYTE" + "OB_WORD_7_UPPER" "59" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_WORD_6_LOWER_BYTE" + "OB_WORD_6_LOWER" "60" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_WORD_6_UPPER_BYTE" + "OB_WORD_6_UPPER" "61" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_WORD_5_LOWER_BYTE" + "OB_WORD_5_LOWER" "62" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_WORD_5_UPPER_BYTE" + "OB_WORD_5_UPPER" "63" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_WORD_4_LOWER_BYTE" + "OB_WORD_4_LOWER" "64" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_WORD_4_UPPER_BYTE" + "OB_WORD_4_UPPER" "65" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_WORD_3_LOWER_BYTE" + "OB_WORD_3_LOWER" "66" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_WORD_3_UPPER_BYTE" + "OB_WORD_3_UPPER" "67" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_WORD_2_LOWER_BYTE" + "OB_WORD_2_LOWER" "68" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_WORD_2_UPPER_BYTE" + "OB_WORD_2_UPPER" "69" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_WORD_1_LOWER_BYTE" + "OB_WORD_1_LOWER" "70" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_WORD_1_UPPER_BYTE" + "OB_WORD_1_UPPER" "71" "" (type "PARAMETER_SIGNED_DEC") ) diff --git a/MainController/RAM9X8_OpticalBusMaster.vhd b/MainController/RAM9X8_OpticalBusMaster.vhd index b9db5ca..e489acc 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_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; + OB_CMD_LOWER : integer := 54; + OB_CMD_UPPER : integer := 55; + OB_WORD_8_LOWER : integer := 56; + OB_WORD_8_UPPER : integer := 57; + OB_WORD_7_LOWER : integer := 58; + OB_WORD_7_UPPER : integer := 59; + OB_WORD_6_LOWER : integer := 60; + OB_WORD_6_UPPER : integer := 61; + OB_WORD_5_LOWER : integer := 62; + OB_WORD_5_UPPER : integer := 63; + OB_WORD_4_LOWER : integer := 64; + OB_WORD_4_UPPER : integer := 65; + OB_WORD_3_LOWER : integer := 66; + OB_WORD_3_UPPER : integer := 67; + OB_WORD_2_LOWER : integer := 68; + OB_WORD_2_UPPER : integer := 69; + OB_WORD_1_LOWER : integer := 70; + OB_WORD_1_UPPER : integer := 71; DATA_BUS_WIDTH : integer := 8; ADDRESS_BUS_WIDTH : integer := 9 @@ -68,98 +68,98 @@ begin begin if (ce = '0') then -- Если микросхема выбрана addr := conv_integer(address); - if (addr = REG_ADDR_CMD_UPPER_BYTE or addr = REG_ADDR_CMD_LOWER_BYTE - or addr = REG_ADDR_WORD_8_UPPER_BYTE or addr = REG_ADDR_WORD_8_LOWER_BYTE - or addr = REG_ADDR_WORD_7_UPPER_BYTE or addr = REG_ADDR_WORD_7_LOWER_BYTE - or addr = REG_ADDR_WORD_6_UPPER_BYTE or addr = REG_ADDR_WORD_6_LOWER_BYTE - or addr = REG_ADDR_WORD_5_UPPER_BYTE or addr = REG_ADDR_WORD_5_LOWER_BYTE - or addr = REG_ADDR_WORD_4_UPPER_BYTE or addr = REG_ADDR_WORD_4_LOWER_BYTE - or addr = REG_ADDR_WORD_3_UPPER_BYTE or addr = REG_ADDR_WORD_3_LOWER_BYTE - or addr = REG_ADDR_WORD_2_UPPER_BYTE or addr = REG_ADDR_WORD_2_LOWER_BYTE - or addr = REG_ADDR_WORD_1_UPPER_BYTE or addr = REG_ADDR_WORD_1_LOWER_BYTE) then + if (addr = OB_CMD_UPPER or addr = OB_CMD_LOWER + or addr = OB_WORD_8_UPPER or addr = OB_WORD_8_LOWER + or addr = OB_WORD_7_UPPER or addr = OB_WORD_7_LOWER + or addr = OB_WORD_6_UPPER or addr = OB_WORD_6_LOWER + or addr = OB_WORD_5_UPPER or addr = OB_WORD_5_LOWER + or addr = OB_WORD_4_UPPER or addr = OB_WORD_4_LOWER + or addr = OB_WORD_3_UPPER or addr = OB_WORD_3_LOWER + or addr = OB_WORD_2_UPPER or addr = OB_WORD_2_LOWER + or addr = OB_WORD_1_UPPER or addr = OB_WORD_1_LOWER) then if (oe = '0' and we = '1') then -- Если сигнал чтения активен, а записи нет case addr is - when REG_ADDR_CMD_UPPER_BYTE => + when OB_CMD_UPPER => data <= cmdBuf(15 downto 8); - when REG_ADDR_CMD_LOWER_BYTE => + when OB_CMD_LOWER => data <= cmdBuf(7 downto 0); - when REG_ADDR_WORD_8_UPPER_BYTE => + when OB_WORD_8_UPPER => data <= dataBuf(127 downto 120); - when REG_ADDR_WORD_8_LOWER_BYTE => + when OB_WORD_8_LOWER => data <= dataBuf(119 downto 112); - when REG_ADDR_WORD_7_UPPER_BYTE => + when OB_WORD_7_UPPER => data <= dataBuf(111 downto 104); - when REG_ADDR_WORD_7_LOWER_BYTE => + when OB_WORD_7_LOWER => data <= dataBuf(103 downto 96); - when REG_ADDR_WORD_6_UPPER_BYTE => + when OB_WORD_6_UPPER => data <= dataBuf(95 downto 88); - when REG_ADDR_WORD_6_LOWER_BYTE => + when OB_WORD_6_LOWER => data <= dataBuf(87 downto 80); - when REG_ADDR_WORD_5_UPPER_BYTE => + when OB_WORD_5_UPPER => data <= dataBuf(79 downto 72); - when REG_ADDR_WORD_5_LOWER_BYTE => + when OB_WORD_5_LOWER => data <= dataBuf(71 downto 64); - when REG_ADDR_WORD_4_UPPER_BYTE => + when OB_WORD_4_UPPER => data <= dataBuf(63 downto 56); - when REG_ADDR_WORD_4_LOWER_BYTE => + when OB_WORD_4_LOWER => data <= dataBuf(55 downto 48); - when REG_ADDR_WORD_3_UPPER_BYTE => + when OB_WORD_3_UPPER => data <= dataBuf(47 downto 40); - when REG_ADDR_WORD_3_LOWER_BYTE => + when OB_WORD_3_LOWER => data <= dataBuf(39 downto 32); - when REG_ADDR_WORD_2_UPPER_BYTE => + when OB_WORD_2_UPPER => data <= dataBuf(31 downto 24); - when REG_ADDR_WORD_2_LOWER_BYTE => + when OB_WORD_2_LOWER => data <= dataBuf(23 downto 16); - when REG_ADDR_WORD_1_UPPER_BYTE => + when OB_WORD_1_UPPER => data <= dataBuf(15 downto 8); - when REG_ADDR_WORD_1_LOWER_BYTE => + when OB_WORD_1_LOWER => data <= dataBuf(7 downto 0); when others => data <= (others => 'Z'); -- Запретить запись на шину end case; elsif (oe = '1' and we = '0') then -- Если сигнал записи активен, а чтения нет case addr is - when REG_ADDR_CMD_UPPER_BYTE => + when OB_CMD_UPPER => cmdBuf(15 downto 8) <= data; - when REG_ADDR_CMD_LOWER_BYTE => + when OB_CMD_LOWER => cmdBuf(7 downto 0) <= data; - when REG_ADDR_WORD_8_UPPER_BYTE => + when OB_WORD_8_UPPER => dataBuf(127 downto 120) <= data; - when REG_ADDR_WORD_8_LOWER_BYTE => + when OB_WORD_8_LOWER => dataBuf(119 downto 112) <= data; - when REG_ADDR_WORD_7_UPPER_BYTE => + when OB_WORD_7_UPPER => dataBuf(111 downto 104) <= data; - when REG_ADDR_WORD_7_LOWER_BYTE => + when OB_WORD_7_LOWER => dataBuf(103 downto 96) <= data; - when REG_ADDR_WORD_6_UPPER_BYTE => + when OB_WORD_6_UPPER => dataBuf(95 downto 88) <= data; - when REG_ADDR_WORD_6_LOWER_BYTE => + when OB_WORD_6_LOWER => dataBuf(87 downto 80) <= data; - when REG_ADDR_WORD_5_UPPER_BYTE => + when OB_WORD_5_UPPER => dataBuf(79 downto 72) <= data; - when REG_ADDR_WORD_5_LOWER_BYTE => + when OB_WORD_5_LOWER => dataBuf(71 downto 64) <= data; - when REG_ADDR_WORD_4_UPPER_BYTE => + when OB_WORD_4_UPPER => dataBuf(63 downto 56) <= data; - when REG_ADDR_WORD_4_LOWER_BYTE => + when OB_WORD_4_LOWER => dataBuf(55 downto 48) <= data; - when REG_ADDR_WORD_3_UPPER_BYTE => + when OB_WORD_3_UPPER => dataBuf(47 downto 40) <= data; - when REG_ADDR_WORD_3_LOWER_BYTE => + when OB_WORD_3_LOWER => dataBuf(39 downto 32) <= data; - when REG_ADDR_WORD_2_UPPER_BYTE => + when OB_WORD_2_UPPER => dataBuf(31 downto 24) <= data; - when REG_ADDR_WORD_2_LOWER_BYTE => + when OB_WORD_2_LOWER => dataBuf(23 downto 16) <= data; - when REG_ADDR_WORD_1_UPPER_BYTE => + when OB_WORD_1_UPPER => dataBuf(15 downto 8) <= data; - when REG_ADDR_WORD_1_LOWER_BYTE => + when OB_WORD_1_LOWER => dataBuf(7 downto 0) <= data; when others => data <= (others => 'Z'); -- Запретить запись на шину end case; - if (addr = REG_ADDR_WORD_1_UPPER_BYTE) then + if (addr = OB_WORD_1_UPPER) then start <= '1'; else start <= '0'; diff --git a/MainController/RAM9X8_PWM.bsf b/MainController/RAM9X8_PWM.bsf index eb9b568..f7b2dce 100644 --- a/MainController/RAM9X8_PWM.bsf +++ b/MainController/RAM9X8_PWM.bsf @@ -94,122 +94,122 @@ applicable agreement for further details. (line (pt 328 32)(pt 312 32)(line_width 3)) ) (parameter - "REG_ADDR_MODE_CONTROL_LOWER_BYTE" + "PWM_MODE_CONTROL_LOWER" "14" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_MODE_CONTROL_UPPER_BYTE" + "PWM_MODE_CONTROL_UPPER" "15" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_MASK_2_LOWER_BYTE" + "PWM_MASK_2_LOWER" "16" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_MASK_2_UPPER_BYTE" + "PWM_MASK_2_UPPER" "17" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_MASK_1_LOWER_BYTE" + "PWM_MASK_1_LOWER" "18" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_MASK_1_UPPER_BYTE" + "PWM_MASK_1_UPPER" "19" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_DIRECT_CONTROL_2_LOWER_BYTE" + "PWM_DIRECT_CONTROL_2_LOWER" "20" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_DIRECT_CONTROL_2_UPPER_BYTE" + "PWM_DIRECT_CONTROL_2_UPPER" "21" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_DIRECT_CONTROL_1_LOWER_BYTE" + "PWM_DIRECT_CONTROL_1_LOWER" "22" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_DIRECT_CONTROL_1_UPPER_BYTE" + "PWM_DIRECT_CONTROL_1_UPPER" "23" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_PERIOD_LOWER_BYTE" + "PWM_PERIOD_LOWER" "24" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_PERIOD_UPPER_BYTE" + "PWM_PERIOD_UPPER" "25" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_DIRECTION_2_LOWER_BYTE" + "PWM_DIRECTION_2_LOWER" "26" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_DIRECTION_2_UPPER_BYTE" + "PWM_DIRECTION_2_UPPER" "27" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_DIRECTION_1_LOWER_BYTE" + "PWM_DIRECTION_1_LOWER" "28" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_DIRECTION_1_UPPER_BYTE" + "PWM_DIRECTION_1_UPPER" "29" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_CHANNEL_LOWER_BYTE" + "PWM_CHANNEL_LOWER" "30" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_CHANNEL_UPPER_BYTE" + "PWM_CHANNEL_UPPER" "31" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_TIMING_LOWER_BYTE" + "PWM_TIMING_LOWER" "32" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_TIMING_UPPER_BYTE" + "PWM_TIMING_UPPER" "33" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_CMD_LOWER_BYTE" + "PWM_CMD_LOWER" "34" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_CMD_UPPER_BYTE" + "PWM_CMD_UPPER" "35" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_CONTROL_LOWER_BYTE" + "PWM_CONTROL_LOWER" "36" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_CONTROL_UPPER_BYTE" + "PWM_CONTROL_UPPER" "37" "" (type "PARAMETER_SIGNED_DEC") ) diff --git a/MainController/RAM9X8_PWM.vhd b/MainController/RAM9X8_PWM.vhd index b32b648..ec44333 100644 --- a/MainController/RAM9X8_PWM.vhd +++ b/MainController/RAM9X8_PWM.vhd @@ -5,30 +5,30 @@ use ieee.std_logic_unsigned.all; entity RAM9X8_PWM is generic( - 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; + PWM_MODE_CONTROL_LOWER : integer := 14; + PWM_MODE_CONTROL_UPPER : integer := 15; + PWM_MASK_2_LOWER : integer := 16; + PWM_MASK_2_UPPER : integer := 17; + PWM_MASK_1_LOWER : integer := 18; + PWM_MASK_1_UPPER : integer := 19; + PWM_DIRECT_CONTROL_2_LOWER : integer := 20; + PWM_DIRECT_CONTROL_2_UPPER : integer := 21; + PWM_DIRECT_CONTROL_1_LOWER : integer := 22; + PWM_DIRECT_CONTROL_1_UPPER : integer := 23; + PWM_PERIOD_LOWER : integer := 24; + PWM_PERIOD_UPPER : integer := 25; + PWM_DIRECTION_2_LOWER : integer := 26; + PWM_DIRECTION_2_UPPER : integer := 27; + PWM_DIRECTION_1_LOWER : integer := 28; + PWM_DIRECTION_1_UPPER : integer := 29; + PWM_CHANNEL_LOWER : integer := 30; + PWM_CHANNEL_UPPER : integer := 31; + PWM_TIMING_LOWER : integer := 32; + PWM_TIMING_UPPER : integer := 33; + PWM_CMD_LOWER : integer := 34; + PWM_CMD_UPPER : integer := 35; + PWM_CONTROL_LOWER : integer := 36; + PWM_CONTROL_UPPER : integer := 37; DATA_BUS_WIDTH : integer := 8; ADDRESS_BUS_WIDTH : integer := 9 @@ -83,121 +83,121 @@ begin begin if (ce = '0') then -- Если микросхема выбрана addr := conv_integer(address); - if (addr = REG_ADDR_MODE_CONTROL_UPPER_BYTE or addr = REG_ADDR_MODE_CONTROL_LOWER_BYTE - or addr = REG_ADDR_MASK_2_UPPER_BYTE or addr = REG_ADDR_MASK_2_LOWER_BYTE or addr = REG_ADDR_MASK_1_UPPER_BYTE or addr = REG_ADDR_MASK_1_LOWER_BYTE - or addr = REG_ADDR_DIRECT_CONTROL_2_UPPER_BYTE or addr = REG_ADDR_DIRECT_CONTROL_2_LOWER_BYTE or addr = REG_ADDR_DIRECT_CONTROL_1_UPPER_BYTE or addr = REG_ADDR_DIRECT_CONTROL_1_LOWER_BYTE - or addr = REG_ADDR_PERIOD_UPPER_BYTE or addr = REG_ADDR_PERIOD_LOWER_BYTE - or addr = REG_ADDR_DIRECTION_2_UPPER_BYTE or addr = REG_ADDR_DIRECTION_2_LOWER_BYTE or addr = REG_ADDR_DIRECTION_1_UPPER_BYTE or addr = REG_ADDR_DIRECTION_1_LOWER_BYTE - or addr = REG_ADDR_CHANNEL_UPPER_BYTE or addr = REG_ADDR_CHANNEL_LOWER_BYTE or addr = REG_ADDR_TIMING_UPPER_BYTE or addr = REG_ADDR_TIMING_LOWER_BYTE - or addr = REG_ADDR_CMD_UPPER_BYTE or addr = REG_ADDR_CMD_LOWER_BYTE or addr = REG_ADDR_CONTROL_UPPER_BYTE or addr = REG_ADDR_CONTROL_LOWER_BYTE) then + if (addr = PWM_MODE_CONTROL_UPPER or addr = PWM_MODE_CONTROL_LOWER + or addr = PWM_MASK_2_UPPER or addr = PWM_MASK_2_LOWER or addr = PWM_MASK_1_UPPER or addr = PWM_MASK_1_LOWER + or addr = PWM_DIRECT_CONTROL_2_UPPER or addr = PWM_DIRECT_CONTROL_2_LOWER or addr = PWM_DIRECT_CONTROL_1_UPPER or addr = PWM_DIRECT_CONTROL_1_LOWER + or addr = PWM_PERIOD_UPPER or addr = PWM_PERIOD_LOWER + or addr = PWM_DIRECTION_2_UPPER or addr = PWM_DIRECTION_2_LOWER or addr = PWM_DIRECTION_1_UPPER or addr = PWM_DIRECTION_1_LOWER + or addr = PWM_CHANNEL_UPPER or addr = PWM_CHANNEL_LOWER or addr = PWM_TIMING_UPPER or addr = PWM_TIMING_LOWER + or addr = PWM_CMD_UPPER or addr = PWM_CMD_LOWER or addr = PWM_CONTROL_UPPER or addr = PWM_CONTROL_LOWER) then if (oe = '0' and we = '1') then -- Если сигнал чтения активен, а записи нет case addr is - when REG_ADDR_MODE_CONTROL_UPPER_BYTE => + when PWM_MODE_CONTROL_UPPER => data <= modeBuf(15 downto 8); - when REG_ADDR_MODE_CONTROL_LOWER_BYTE => + when PWM_MODE_CONTROL_LOWER => data <= modeBuf(7 downto 0); - when REG_ADDR_MASK_2_UPPER_BYTE => + when PWM_MASK_2_UPPER => data <= maskBuf(31 downto 24); - when REG_ADDR_MASK_2_LOWER_BYTE => + when PWM_MASK_2_LOWER => data <= maskBuf(23 downto 16); - when REG_ADDR_MASK_1_UPPER_BYTE => + when PWM_MASK_1_UPPER => data <= maskBuf(15 downto 8); - when REG_ADDR_MASK_1_LOWER_BYTE => + when PWM_MASK_1_LOWER => data <= maskBuf(7 downto 0); - when REG_ADDR_DIRECT_CONTROL_2_UPPER_BYTE => + when PWM_DIRECT_CONTROL_2_UPPER => data <= directControlBuf(31 downto 24); - when REG_ADDR_DIRECT_CONTROL_2_LOWER_BYTE => + when PWM_DIRECT_CONTROL_2_LOWER => data <= directControlBuf(23 downto 16); - when REG_ADDR_DIRECT_CONTROL_1_UPPER_BYTE => + when PWM_DIRECT_CONTROL_1_UPPER => data <= directControlBuf(15 downto 8); - when REG_ADDR_DIRECT_CONTROL_1_LOWER_BYTE => + when PWM_DIRECT_CONTROL_1_LOWER => data <= directControlBuf(7 downto 0); - when REG_ADDR_PERIOD_UPPER_BYTE => + when PWM_PERIOD_UPPER => data <= periodBuf(15 downto 8); - when REG_ADDR_PERIOD_LOWER_BYTE => + when PWM_PERIOD_LOWER => data <= periodBuf(7 downto 0); - when REG_ADDR_DIRECTION_2_UPPER_BYTE => + when PWM_DIRECTION_2_UPPER => data <= directionBuf(31 downto 24); - when REG_ADDR_DIRECTION_2_LOWER_BYTE => + when PWM_DIRECTION_2_LOWER => data <= directionBuf(23 downto 16); - when REG_ADDR_DIRECTION_1_UPPER_BYTE => + when PWM_DIRECTION_1_UPPER => data <= directionBuf(15 downto 8); - when REG_ADDR_DIRECTION_1_LOWER_BYTE => + when PWM_DIRECTION_1_LOWER => data <= directionBuf(7 downto 0); - when REG_ADDR_CHANNEL_UPPER_BYTE => + when PWM_CHANNEL_UPPER => data <= channelBuf(15 downto 8); - when REG_ADDR_CHANNEL_LOWER_BYTE => + when PWM_CHANNEL_LOWER => data <= channelBuf(7 downto 0); - when REG_ADDR_TIMING_UPPER_BYTE => + when PWM_TIMING_UPPER => data <= memory(conv_integer(channelBuf))(15 downto 8); - when REG_ADDR_TIMING_LOWER_BYTE => + when PWM_TIMING_LOWER => data <= memory(conv_integer(channelBuf))(7 downto 0); - when REG_ADDR_CMD_UPPER_BYTE => + when PWM_CMD_UPPER => data <= cmdBuf(15 downto 8); - when REG_ADDR_CMD_LOWER_BYTE => + when PWM_CMD_LOWER => data <= cmdBuf(7 downto 0); - when REG_ADDR_CONTROL_UPPER_BYTE => + when PWM_CONTROL_UPPER => data <= controlBuf(15 downto 8); - when REG_ADDR_CONTROL_LOWER_BYTE => + when PWM_CONTROL_LOWER => data <= controlBuf(7 downto 0); when others => data <= (others => 'Z'); -- Запретить запись на шину end case; - if addr /= REG_ADDR_CONTROL_LOWER_BYTE then + if addr /= PWM_CONTROL_LOWER then enableWriteControlBuf <= '1'; else enableWriteControlBuf <= '0'; end if; elsif (oe = '1' and we = '0') then -- Если сигнал записи активен, а чтения нет case addr is - when REG_ADDR_MODE_CONTROL_UPPER_BYTE => + when PWM_MODE_CONTROL_UPPER => modeBuf(15 downto 8) <= data; - when REG_ADDR_MODE_CONTROL_LOWER_BYTE => + when PWM_MODE_CONTROL_LOWER => modeBuf(7 downto 0) <= data; - when REG_ADDR_MASK_2_UPPER_BYTE => + when PWM_MASK_2_UPPER => maskBuf(31 downto 24) <= data; - when REG_ADDR_MASK_2_LOWER_BYTE => + when PWM_MASK_2_LOWER => maskBuf(23 downto 16) <= data; - when REG_ADDR_MASK_1_UPPER_BYTE => + when PWM_MASK_1_UPPER => maskBuf(15 downto 8) <= data; - when REG_ADDR_MASK_1_LOWER_BYTE => + when PWM_MASK_1_LOWER => maskBuf(7 downto 0) <= data; - when REG_ADDR_DIRECT_CONTROL_2_UPPER_BYTE => + when PWM_DIRECT_CONTROL_2_UPPER => directControlBuf(31 downto 24) <= data; - when REG_ADDR_DIRECT_CONTROL_2_LOWER_BYTE => + when PWM_DIRECT_CONTROL_2_LOWER => directControlBuf(23 downto 16) <= data; - when REG_ADDR_DIRECT_CONTROL_1_UPPER_BYTE => + when PWM_DIRECT_CONTROL_1_UPPER => directControlBuf(15 downto 8) <= data; - when REG_ADDR_DIRECT_CONTROL_1_LOWER_BYTE => + when PWM_DIRECT_CONTROL_1_LOWER => directControlBuf(7 downto 0) <= data; - when REG_ADDR_PERIOD_UPPER_BYTE => + when PWM_PERIOD_UPPER => periodBuf(15 downto 8) <= data; - when REG_ADDR_PERIOD_LOWER_BYTE => + when PWM_PERIOD_LOWER => periodBuf(7 downto 0) <= data; - when REG_ADDR_DIRECTION_2_UPPER_BYTE => + when PWM_DIRECTION_2_UPPER => directionBuf(31 downto 24) <= data; - when REG_ADDR_DIRECTION_2_LOWER_BYTE => + when PWM_DIRECTION_2_LOWER => directionBuf(23 downto 16) <= data; - when REG_ADDR_DIRECTION_1_UPPER_BYTE => + when PWM_DIRECTION_1_UPPER => directionBuf(15 downto 8) <= data; - when REG_ADDR_DIRECTION_1_LOWER_BYTE => + when PWM_DIRECTION_1_LOWER => directionBuf(7 downto 0) <= data; - when REG_ADDR_CHANNEL_UPPER_BYTE => + when PWM_CHANNEL_UPPER => channelBuf(15 downto 8) <= data; - when REG_ADDR_CHANNEL_LOWER_BYTE => + when PWM_CHANNEL_LOWER => channelBuf(7 downto 0) <= data; - when REG_ADDR_TIMING_UPPER_BYTE => + when PWM_TIMING_UPPER => memory(conv_integer(channelBuf))(15 downto 8) <= data; - when REG_ADDR_TIMING_LOWER_BYTE => + when PWM_TIMING_LOWER => memory(conv_integer(channelBuf))(7 downto 0) <= data; - when REG_ADDR_CMD_UPPER_BYTE => + when PWM_CMD_UPPER => cmdBuf(15 downto 8) <= data; - when REG_ADDR_CMD_LOWER_BYTE => + when PWM_CMD_LOWER => cmdBuf(7 downto 0) <= data; --- when REG_ADDR_CONTROL_UPPER_BYTE => +-- when PWM_CONTROL_UPPER => -- controlBuf(15 downto 8) <= data; --- when REG_ADDR_CONTROL_LOWER_BYTE => +-- when PWM_CONTROL_LOWER => -- controlBuf(7 downto 0) <= data; when others => data <= (others => 'Z'); -- Запретить запись на шину diff --git a/MainController/RAM9X8_ParallelBusMaster.bsf b/MainController/RAM9X8_ParallelBusMaster.bsf index 06cbcba..8b2a1ff 100644 --- a/MainController/RAM9X8_ParallelBusMaster.bsf +++ b/MainController/RAM9X8_ParallelBusMaster.bsf @@ -101,42 +101,42 @@ applicable agreement for further details. (line (pt 328 96)(pt 312 96)(line_width 3)) ) (parameter - "REG_ADDR_FIRST_FREE_LOWER_BYTE" + "PB_FIRST_FREE_LOWER" "6" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_FIRST_FREE_UPPER_BYTE" + "PB_FIRST_FREE_UPPER" "7" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_CMD_LOWER_BYTE" + "PB_CMD_LOWER" "8" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_CMD_UPPER_BYTE" + "PB_CMD_UPPER" "9" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_FILL_ADDRESS_SPACE_LOWER_BYTE" + "PB_FILL_ADDRESS_SPACE_LOWER" "10" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_FILL_ADDRESS_SPACE_UPPER_BYTE" + "PB_FILL_ADDRESS_SPACE_UPPER" "11" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_CONTROL_LOWER_BYTE" + "PB_CONTROL_LOWER" "12" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_CONTROL_UPPER_BYTE" + "PB_CONTROL_UPPER" "13" "" (type "PARAMETER_SIGNED_DEC") ) diff --git a/MainController/RAM9X8_ParallelBusMaster.vhd b/MainController/RAM9X8_ParallelBusMaster.vhd index 617febf..04856f7 100644 --- a/MainController/RAM9X8_ParallelBusMaster.vhd +++ b/MainController/RAM9X8_ParallelBusMaster.vhd @@ -5,14 +5,14 @@ use ieee.std_logic_unsigned.all; entity RAM9X8_ParallelBusMaster is generic( - 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; + PB_FIRST_FREE_LOWER : integer := 6; + PB_FIRST_FREE_UPPER : integer := 7; + PB_CMD_LOWER : integer := 8; + PB_CMD_UPPER : integer := 9; + PB_FILL_ADDRESS_SPACE_LOWER : integer := 10; + PB_FILL_ADDRESS_SPACE_UPPER : integer := 11; + PB_CONTROL_LOWER : integer := 12; + PB_CONTROL_UPPER : integer := 13; ARRAY_LENGTH : integer := 256; DATA_BUS_WIDTH : integer := 8; @@ -67,42 +67,42 @@ begin begin if (ce = '0') then -- Если микросхема выбрана addr := conv_integer(address); - if (addr = REG_ADDR_FIRST_FREE_UPPER_BYTE or addr = REG_ADDR_FIRST_FREE_LOWER_BYTE or addr = REG_ADDR_CMD_UPPER_BYTE or addr = REG_ADDR_CMD_LOWER_BYTE - or addr = REG_ADDR_FILL_ADDRESS_SPACE_UPPER_BYTE or addr = REG_ADDR_FILL_ADDRESS_SPACE_LOWER_BYTE or addr = REG_ADDR_CONTROL_UPPER_BYTE or addr = REG_ADDR_CONTROL_LOWER_BYTE) then + if (addr = PB_FIRST_FREE_UPPER or addr = PB_FIRST_FREE_LOWER or addr = PB_CMD_UPPER or addr = PB_CMD_LOWER + or addr = PB_FILL_ADDRESS_SPACE_UPPER or addr = PB_FILL_ADDRESS_SPACE_LOWER or addr = PB_CONTROL_UPPER or addr = PB_CONTROL_LOWER) then if (oe = '0' and we = '1') then -- Если сигнал чтения активен, а записи нет case addr is - when REG_ADDR_FIRST_FREE_UPPER_BYTE => + when PB_FIRST_FREE_UPPER => data <= firstFreeBuf(15 downto 8); - when REG_ADDR_FIRST_FREE_LOWER_BYTE => + when PB_FIRST_FREE_LOWER => data <= firstFreeBuf(7 downto 0); - when REG_ADDR_CMD_UPPER_BYTE => + when PB_CMD_UPPER => data <= cmdBuf(15 downto 8); - when REG_ADDR_CMD_LOWER_BYTE => + when PB_CMD_LOWER => data <= cmdBuf(7 downto 0); - when REG_ADDR_FILL_ADDRESS_SPACE_UPPER_BYTE => + when PB_FILL_ADDRESS_SPACE_UPPER => data <= fasBuf(15 downto 8); - when REG_ADDR_FILL_ADDRESS_SPACE_LOWER_BYTE => + when PB_FILL_ADDRESS_SPACE_LOWER => data <= fasBuf(7 downto 0); - when REG_ADDR_CONTROL_UPPER_BYTE => + when PB_CONTROL_UPPER => data <= errorBuf; - when REG_ADDR_CONTROL_LOWER_BYTE => + when PB_CONTROL_LOWER => data <= controlBuf(7 downto 0); when others => data <= (others => 'Z'); -- Запретить запись на шину end case; elsif (oe = '1' and we = '0') then -- Если сигнал записи активен, а чтения нет case addr is - when REG_ADDR_FIRST_FREE_UPPER_BYTE => + when PB_FIRST_FREE_UPPER => firstFreeBuf(15 downto 8) <= data; - when REG_ADDR_FIRST_FREE_LOWER_BYTE => + when PB_FIRST_FREE_LOWER => firstFreeBuf(7 downto 0) <= data; - when REG_ADDR_CMD_UPPER_BYTE => + when PB_CMD_UPPER => cmdBuf(15 downto 8) <= data; - when REG_ADDR_CMD_LOWER_BYTE => + when PB_CMD_LOWER => cmdBuf(7 downto 0) <= data; - when REG_ADDR_FILL_ADDRESS_SPACE_UPPER_BYTE => + when PB_FILL_ADDRESS_SPACE_UPPER => fasBuf(15 downto 8) <= data; - when REG_ADDR_FILL_ADDRESS_SPACE_LOWER_BYTE => + when PB_FILL_ADDRESS_SPACE_LOWER => fasBuf(7 downto 0) <= data; position := conv_integer(data); memoryAddress(position) <= fasBuf(15 downto 8); diff --git a/MainController/RAM9X8_Peripheral.bsf b/MainController/RAM9X8_Peripheral.bsf new file mode 100644 index 0000000..c50c777 --- /dev/null +++ b/MainController/RAM9X8_Peripheral.bsf @@ -0,0 +1,140 @@ +/* +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 192) + (text "RAM9X8_Peripheral" (rect 5 0 89 12)(font "Arial" )) + (text "inst" (rect 8 160 20 172)(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 "error" (rect 0 0 20 12)(font "Arial" )) + (text "error" (rect 21 107 41 119)(font "Arial" )) + (line (pt 0 112)(pt 16 112)(line_width 1)) + ) + (port + (pt 0 128) + (input) + (text "init" (rect 0 0 9 12)(font "Arial" )) + (text "init" (rect 21 123 30 135)(font "Arial" )) + (line (pt 0 128)(pt 16 128)(line_width 1)) + ) + (port + (pt 328 48) + (output) + (text "asyncline" (rect 0 0 36 12)(font "Arial" )) + (text "asyncline" (rect 271 43 307 55)(font "Arial" )) + (line (pt 328 48)(pt 312 48)(line_width 1)) + ) + (port + (pt 328 64) + (output) + (text "divclk" (rect 0 0 22 12)(font "Arial" )) + (text "divclk" (rect 285 59 307 71)(font "Arial" )) + (line (pt 328 64)(pt 312 64)(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 + "PER_ACTIVE_DEVICE_LOWER" + "38" + "" + (type "PARAMETER_SIGNED_DEC") ) + (parameter + "PER_ACTIVE_DEVICE_UPPER" + "39" + "" + (type "PARAMETER_SIGNED_DEC") ) + (parameter + "PER_REZERVED_1_LOWER" + "40" + "" + (type "PARAMETER_SIGNED_DEC") ) + (parameter + "PER_REZERVED_1_UPPER" + "41" + "" + (type "PARAMETER_SIGNED_DEC") ) + (parameter + "PER_REZERVED_2_LOWER" + "42" + "" + (type "PARAMETER_SIGNED_DEC") ) + (parameter + "PER_REZERVED_2_UPPER" + "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 160)(line_width 1)) + ) + (annotation_block (parameter)(rect 344 -64 444 16)) +) diff --git a/MainController/RAM9X8_Peripheral.vhd b/MainController/RAM9X8_Peripheral.vhd new file mode 100644 index 0000000..e763659 --- /dev/null +++ b/MainController/RAM9X8_Peripheral.vhd @@ -0,0 +1,290 @@ +library ieee; +use ieee.std_logic_1164.all; +use ieee.std_logic_arith.all; +use ieee.std_logic_unsigned.all; + +entity RAM9X8_Peripheral is + generic( + PER_ACTIVE_DEVICE_LOWER : integer := 38; + PER_ACTIVE_DEVICE_UPPER : integer := 39; + PER_REZERVED_1_LOWER : integer := 40; + PER_REZERVED_1_UPPER : integer := 41; + PER_REZERVED_2_LOWER : integer := 42; + PER_REZERVED_2_UPPER : 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; + + asyncline : out std_logic := '1'; + divclk : out std_logic := '1'; + error : in std_logic; + init : in std_logic + ); +end entity; + +architecture behavorial of RAM9X8_Peripheral is + +signal activeDeviceBuf : std_logic_vector(15 downto 0) := (others => '0'); +signal rezerved1Buf : std_logic_vector(15 downto 0) := (others => '0'); +signal rezerved2Buf : std_logic_vector(15 downto 0) := (others => '0'); + +signal divClkBuf : std_logic := '0'; +signal divClkBufPWM : std_logic := '0'; + +signal addrBuf : std_logic_vector(3 downto 0) := (others => '0'); + +signal LedState : std_logic_vector(1 downto 0) := (others => '0'); + +type BusSt is (Waiting, A3, A2, A1, A0, Dt, Finish); +signal BusState : BusSt := Waiting; + +signal countBuf : std_logic_vector(3 downto 0) := (others => '0'); +signal countBufPWM : std_logic_vector(3 downto 0) := (others => '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 = PER_ACTIVE_DEVICE_UPPER or addr = PER_ACTIVE_DEVICE_LOWER + or addr = PER_REZERVED_1_UPPER or addr = PER_REZERVED_1_LOWER + or addr = PER_REZERVED_2_UPPER or addr = PER_REZERVED_2_LOWER) then + if (oe = '0' and we = '1') then -- Если сигнал чтения активен, а записи нет + case addr is + when PER_ACTIVE_DEVICE_UPPER => + data <= activeDeviceBuf(15 downto 8); + when PER_ACTIVE_DEVICE_LOWER => + data <= activeDeviceBuf(7 downto 0); + when PER_REZERVED_1_UPPER => + data <= rezerved1Buf(15 downto 8); + when PER_REZERVED_1_LOWER => + data <= rezerved1Buf(7 downto 0); + when PER_REZERVED_2_UPPER => + data <= rezerved2Buf(15 downto 8); + when PER_REZERVED_2_LOWER => + data <= rezerved2Buf(7 downto 0); + when others => + data <= (others => 'Z'); -- Запретить запись на шину + end case; + elsif (oe = '1' and we = '0') then -- Если сигнал записи активен, а чтения нет + case addr is + when PER_ACTIVE_DEVICE_UPPER => + activeDeviceBuf(15 downto 8) <= data; + when PER_ACTIVE_DEVICE_LOWER => + activeDeviceBuf(7 downto 0) <= data; + when PER_REZERVED_1_UPPER => + rezerved1Buf(15 downto 8) <= data; + when PER_REZERVED_1_LOWER => + rezerved1Buf(7 downto 0) <= data; + when PER_REZERVED_2_UPPER => + rezerved2Buf(15 downto 8) <= data; + when PER_REZERVED_2_LOWER => + rezerved2Buf(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 + variable count50000 : integer range 0 to 50000 := 0; + variable count50 : integer range 0 to 50 := 0; + begin + if rising_edge(clk) then + if count50000 < 50000 then + count50000 := count50000 + 1; + else + divClkBufPWM <= not divClkBufPWM; + count50000 := 0; + if count50 < 50 then + count50 := count50 + 1; + else + count50 := 0; + divClkBuf <= not divClkBuf; + end if; + end if; + end if; + end process; + + process(divClkBufPWM) is + begin + if conv_integer(countBufPWM) < 15 then + countBufPWM <= conv_std_logic_vector(conv_integer(countBufPWM) + 1, 4); + else + countBufPWM <= (others => '0'); + end if; + end process; + + process(divClkBuf) is + variable direction : integer range 0 to 1 := 0; + begin + if direction = 0 then + if conv_integer(countBuf) < 15 then + countBuf <= conv_std_logic_vector(conv_integer(countBuf) + 1, 4); + else + direction := 1; + end if; + else + if conv_integer(countBuf) > 0 then + countBuf <= conv_std_logic_vector(conv_integer(countBuf) - 1, 4); + else + direction := 0; + end if; + end if; + end process; + + process(divClkBuf) is + variable count15 : integer range 0 to 15 := 0; + begin + case LedState is + when b"00" => + if count15 < 15 then + count15 := count15 + 1; + else + count15 := 0; + LedState <= b"01"; + end if; + divclk <= '0'; + when b"01" => + if count15 < 7 then + count15 := count15 + 1; + else + count15 := 0; + LedState <= b"10"; + end if; + divclk <= '1'; + when b"10" => + if count15 < 15 then + count15 := count15 + 1; + else + count15 := 0; + LedState <= b"11"; + end if; + divclk <= '0'; + when b"11" => + if count15 < 4 then + count15 := count15 + 1; + else + count15 := 0; + LedState <= b"00"; + end if; + divclk <= '1'; + when others => + LedState <= b"00"; + end case; + end process; + + process(clk) is + variable count50 : integer range 0 to 50 := 0; + variable count15 : integer range 0 to 15 := 15; + begin + if rising_edge(clk) then + if init = '0' then + case BusState is + when Waiting => + if count50 < 38 then + count50 := count50 + 1; + else + if count15 < 15 then + count15 := count15 + 1; + else + count15 := 0; + end if; + if activeDeviceBuf(count15) = '1' then + addrBuf <= conv_std_logic_vector(count15, 4); + asyncline <= '0'; + count50 := 0; + BusState <= A3; + end if; + end if; + when A3 => + if count50 < 18 then + count50 := count50 + 1; + else + count50 := 0; + asyncline <= addrBuf(3); + BusState <= A2; + end if; + when A2 => + if count50 < 38 then + count50 := count50 + 1; + else + count50 := 0; + asyncline <= addrBuf(2); + BusState <= A1; + end if; + when A1 => + if count50 < 38 then + count50 := count50 + 1; + else + count50 := 0; + asyncline <= addrBuf(1); + BusState <= A0; + end if; + when A0 => + if count50 < 38 then + count50 := count50 + 1; + else + count50 := 0; + asyncline <= addrBuf(0); + BusState <= Dt; + end if; + when Dt => + if count50 < 38 then + count50 := count50 + 1; + else + count50 := 0; + asyncline <= divClkBuf; + BusState <= Finish; + end if; + when Finish => + if count50 < 38 then + count50 := count50 + 1; + else + count50 := 0; + asyncline <= '1'; + BusState <= Finish; + end if; + when others => + BusState <= Waiting; + count50 := 0; + count15 :=15; + end case; + else + BusState <= Waiting; + count50 := 0; + count15 := 15; + if error = '0' then + if countBuf < countBufPWM then + asyncline <= '1'; + else + asyncline <= '0'; + end if; + else + asyncline <= '1'; + end if; + end if; + end if; + end process; + +end behavorial; \ No newline at end of file diff --git a/MainController/RAM9X8_SerialBusMaster.bsf b/MainController/RAM9X8_SerialBusMaster.bsf index 65ed69f..218d57a 100644 --- a/MainController/RAM9X8_SerialBusMaster.bsf +++ b/MainController/RAM9X8_SerialBusMaster.bsf @@ -87,32 +87,32 @@ applicable agreement for further details. (line (pt 328 32)(pt 312 32)(line_width 3)) ) (parameter - "REG_ADDR_DATA_LOWER_BYTE" + "SB_DATA_LOWER" "0" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_DATA_UPPER_BYTE" + "SB_DATA_UPPER" "1" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_CMD_LOWER_BYTE" + "SB_CMD_LOWER" "2" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_CMD_UPPER_BYTE" + "SB_CMD_UPPER" "3" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_CONTROL_LOWER_BYTE" + "SB_CONTROL_LOWER" "4" "" (type "PARAMETER_SIGNED_DEC") ) (parameter - "REG_ADDR_CONTROL_UPPER_BYTE" + "SB_CONTROL_UPPER" "5" "" (type "PARAMETER_SIGNED_DEC") ) diff --git a/MainController/RAM9X8_SerialBusMaster.vhd b/MainController/RAM9X8_SerialBusMaster.vhd index a1465ab..c168183 100644 --- a/MainController/RAM9X8_SerialBusMaster.vhd +++ b/MainController/RAM9X8_SerialBusMaster.vhd @@ -5,12 +5,12 @@ use ieee.std_logic_unsigned.all; entity RAM9X8_SerialBusMaster is generic( - 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; + SB_DATA_LOWER : integer := 0; + SB_DATA_UPPER : integer := 1; + SB_CMD_LOWER : integer := 2; + SB_CMD_UPPER : integer := 3; + SB_CONTROL_LOWER : integer := 4; + SB_CONTROL_UPPER : integer := 5; DATA_BUS_WIDTH : integer := 8; ADDRESS_BUS_WIDTH : integer := 9 @@ -63,36 +63,36 @@ begin begin if (ce = '0') then -- Если микросхема выбрана addr := conv_integer(address); - if (addr = REG_ADDR_DATA_UPPER_BYTE or addr = REG_ADDR_DATA_LOWER_BYTE or addr = REG_ADDR_CMD_UPPER_BYTE or addr = REG_ADDR_CMD_LOWER_BYTE - or addr = REG_ADDR_CONTROL_UPPER_BYTE or addr = REG_ADDR_CONTROL_LOWER_BYTE) then + if (addr = SB_DATA_UPPER or addr = SB_DATA_LOWER or addr = SB_CMD_UPPER or addr = SB_CMD_LOWER + or addr = SB_CONTROL_UPPER or addr = SB_CONTROL_LOWER) then if (oe = '0' and we = '1') then -- Если сигнал чтения активен, а записи нет case addr is - when REG_ADDR_DATA_UPPER_BYTE => + when SB_DATA_UPPER => data <= dataBufOut(15 downto 8); - when REG_ADDR_DATA_LOWER_BYTE => + when SB_DATA_LOWER => data <= dataBufOut(7 downto 0); - when REG_ADDR_CMD_UPPER_BYTE => + when SB_CMD_UPPER => data <= cmdBuf(15 downto 8); - when REG_ADDR_CMD_LOWER_BYTE => + when SB_CMD_LOWER => data <= cmdBuf(7 downto 0); - when REG_ADDR_CONTROL_UPPER_BYTE => + when SB_CONTROL_UPPER => data <= controlBuf(15 downto 8); start <= '0'; - when REG_ADDR_CONTROL_LOWER_BYTE => + when SB_CONTROL_LOWER => data <= controlBuf(7 downto 0); when others => data <= (others => 'Z'); -- Запретить запись на шину end case; elsif (oe = '1' and we = '0') then -- Если сигнал записи активен, а чтения нет case addr is - when REG_ADDR_DATA_UPPER_BYTE => + when SB_DATA_UPPER => dataBufIn(15 downto 8) <= data; - when REG_ADDR_DATA_LOWER_BYTE => + when SB_DATA_LOWER => dataBufIn(7 downto 0) <= data; - when REG_ADDR_CMD_UPPER_BYTE => + when SB_CMD_UPPER => cmdBuf(15 downto 8) <= data; start <= '1'; - when REG_ADDR_CMD_LOWER_BYTE => + when SB_CMD_LOWER => cmdBuf(7 downto 0) <= data; when others => data <= (others => 'Z'); -- Запретить запись на шину @@ -110,7 +110,7 @@ begin process(clk) is variable count : integer range 0 to 255 := 0; - variable countValue : integer range 0 to 255 := 63; + variable countValue : integer range 0 to 255 := 50; variable state : integer range 0 to 1 := 1; variable bitCnt : integer range -1 to 31 := 0; variable latch : integer range 0 to 1 := 0; diff --git a/MainController/RAM9X8_Service.bsf b/MainController/RAM9X8_Service.bsf new file mode 100644 index 0000000..796c25a --- /dev/null +++ b/MainController/RAM9X8_Service.bsf @@ -0,0 +1,157 @@ +/* +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 160) + (text "RAM9X8_Service" (rect 5 0 81 12)(font "Arial" )) + (text "inst" (rect 8 128 20 140)(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 "er0_in" (rect 0 0 24 12)(font "Arial" )) + (text "er0_in" (rect 21 107 45 119)(font "Arial" )) + (line (pt 0 112)(pt 16 112)(line_width 1)) + ) + (port + (pt 328 48) + (output) + (text "leds[3..0]" (rect 0 0 35 12)(font "Arial" )) + (text "leds[3..0]" (rect 272 43 307 55)(font "Arial" )) + (line (pt 328 48)(pt 312 48)(line_width 3)) + ) + (port + (pt 328 64) + (output) + (text "er0_out" (rect 0 0 30 12)(font "Arial" )) + (text "er0_out" (rect 277 59 307 71)(font "Arial" )) + (line (pt 328 64)(pt 312 64)(line_width 1)) + ) + (port + (pt 328 80) + (output) + (text "init" (rect 0 0 9 12)(font "Arial" )) + (text "init" (rect 298 75 307 87)(font "Arial" )) + (line (pt 328 80)(pt 312 80)(line_width 1)) + ) + (port + (pt 328 96) + (output) + (text "sres" (rect 0 0 17 12)(font "Arial" )) + (text "sres" (rect 290 91 307 103)(font "Arial" )) + (line (pt 328 96)(pt 312 96)(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 + "SRV_CONTROL_LOWER" + "72" + "" + (type "PARAMETER_SIGNED_DEC") ) + (parameter + "SRV_CONTROL_UPPER" + "73" + "" + (type "PARAMETER_SIGNED_DEC") ) + (parameter + "SRV_LEDS_LOWER" + "74" + "" + (type "PARAMETER_SIGNED_DEC") ) + (parameter + "SRV_LEDS_UPPER" + "75" + "" + (type "PARAMETER_SIGNED_DEC") ) + (parameter + "SRV_INIT_LOWER" + "76" + "" + (type "PARAMETER_SIGNED_DEC") ) + (parameter + "SRV_INIT_UPPER" + "77" + "" + (type "PARAMETER_SIGNED_DEC") ) + (parameter + "SRV_VERSION_LOWER" + "78" + "" + (type "PARAMETER_SIGNED_DEC") ) + (parameter + "SRV_VERSION_UPPER" + "79" + "" + (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)(line_width 1)) + ) + (annotation_block (parameter)(rect 344 -64 444 16)) +) diff --git a/MainController/RAM9X8_Service.vhd b/MainController/RAM9X8_Service.vhd new file mode 100644 index 0000000..8b7c309 --- /dev/null +++ b/MainController/RAM9X8_Service.vhd @@ -0,0 +1,119 @@ +library ieee; +use ieee.std_logic_1164.all; +use ieee.std_logic_arith.all; +use ieee.std_logic_unsigned.all; + +entity RAM9X8_Service is + generic( + SRV_CONTROL_LOWER : integer := 72; + SRV_CONTROL_UPPER : integer := 73; + SRV_LEDS_LOWER : integer := 74; + SRV_LEDS_UPPER : integer := 75; + SRV_INIT_LOWER : integer := 76; + SRV_INIT_UPPER : integer := 77; + SRV_VERSION_LOWER : integer := 78; + SRV_VERSION_UPPER : integer := 79; + + 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; + + er0_in : in std_logic; + leds : out std_logic_vector(3 downto 0); + er0_out : out std_logic; + init : out std_logic; + sres : out std_logic + ); +end entity; + +architecture behavorial of RAM9X8_Service is + +signal ledsBuf : std_logic_vector(15 downto 0) := (others => '0'); +signal initBuf : std_logic_vector(15 downto 0) := (others => '0'); +signal versionBuf : std_logic_vector(15 downto 0) := x"0004"; + +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 = SRV_CONTROL_UPPER or addr = SRV_CONTROL_LOWER + or addr = SRV_LEDS_LOWER or addr = SRV_LEDS_UPPER + or addr = SRV_INIT_LOWER or addr = SRV_INIT_UPPER + or addr = SRV_VERSION_LOWER or addr = SRV_VERSION_UPPER) then + if (oe = '0' and we = '1') then -- Если сигнал чтения активен, а записи нет + case addr is + when SRV_CONTROL_UPPER => + data <= (others => '0'); + when SRV_CONTROL_LOWER => + data(7 downto 1) <= (others => '0'); + data(0) <= er0_in; + when SRV_LEDS_UPPER => + data <= ledsBuf(15 downto 8); + when SRV_LEDS_LOWER => + data <= ledsBuf(7 downto 0); + when SRV_INIT_UPPER => + data <= not initBuf(15 downto 8); + when SRV_INIT_LOWER => + data <= not initBuf(7 downto 0); + when SRV_VERSION_UPPER => + data <= versionBuf(15 downto 8); + when SRV_VERSION_LOWER => + data <= versionBuf(7 downto 0); + when others => + data <= (others => 'Z'); -- Запретить запись на шину + end case; + elsif (oe = '1' and we = '0') then -- Если сигнал записи активен, а чтения нет + case addr is + when SRV_LEDS_UPPER => + ledsBuf(15 downto 8) <= data; + when SRV_LEDS_LOWER => + ledsBuf(7 downto 0) <= data; + when SRV_INIT_UPPER => + initBuf(15 downto 8) <= data; + when SRV_INIT_LOWER => + initBuf(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 + if initBuf = x"5AA5" then + init <= '1'; + end if; + end if; + end process; + + process(clk) + begin + if rising_edge(clk) then + leds <= ledsBuf(3 downto 0); + er0_out <= ledsBuf(15); + sres <= ledsBuf(14); + end if; + end process; + +end behavorial; \ No newline at end of file diff --git a/Xilinx Spartan 2E.pdf b/Xilinx Spartan 2E.pdf new file mode 100644 index 0000000..ec7ef66 Binary files /dev/null and b/Xilinx Spartan 2E.pdf differ