summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacien TRAN-GIRARD2014-04-11 21:43:11 +0200
committerPacien TRAN-GIRARD2014-04-11 21:43:11 +0200
commit739ab6105f074e6514ad0681afd2e7994287a133 (patch)
tree7be5babf04e162868a4d23961f111e8eefa252d8
parent2a1b2c866bb630038100a150ee5da976f551e072 (diff)
downloadfpga-home-automation-739ab6105f074e6514ad0681afd2e7994287a133.tar.gz
Replace combinatory logic by mux
-rw-r--r--FPGA/commande/commande.qsf1
-rw-r--r--FPGA/commande/fan.bdf389
2 files changed, 194 insertions, 196 deletions
diff --git a/FPGA/commande/commande.qsf b/FPGA/commande/commande.qsf
index 9f700cb..e64ba9e 100644
--- a/FPGA/commande/commande.qsf
+++ b/FPGA/commande/commande.qsf
@@ -68,4 +68,5 @@ set_location_assignment PIN_AB21 -to speed[0]
68set_location_assignment PIN_AF23 -to fan_auto 68set_location_assignment PIN_AF23 -to fan_auto
69set_location_assignment PIN_AE23 -to alarm 69set_location_assignment PIN_AE23 -to alarm
70set_global_assignment -name STRATIX_DEVICE_IO_STANDARD "3.3-V LVTTL" 70set_global_assignment -name STRATIX_DEVICE_IO_STANDARD "3.3-V LVTTL"
71set_global_assignment -name RESERVE_ALL_UNUSED_PINS_NO_OUTPUT_GND "AS INPUT TRI-STATED"
71set_instance_assignment -name PARTITION_HIERARCHY root_partition -to | -section_id Top \ No newline at end of file 72set_instance_assignment -name PARTITION_HIERARCHY root_partition -to | -section_id Top \ No newline at end of file
diff --git a/FPGA/commande/fan.bdf b/FPGA/commande/fan.bdf
index b67a23a..7a62110 100644
--- a/FPGA/commande/fan.bdf
+++ b/FPGA/commande/fan.bdf
@@ -23,7 +23,7 @@ applicable agreement for further details.
23 (input) 23 (input)
24 (rect 48 40 224 56) 24 (rect 48 40 224 56)
25 (text "INPUT" (rect 133 0 161 10)(font "Arial" (font_size 6))) 25 (text "INPUT" (rect 133 0 161 10)(font "Arial" (font_size 6)))
26 (text "fan_auto_user" (rect 5 0 77 11)(font "Arial" )) 26 (text "fan_auto_user" (rect 5 0 76 11)(font "Arial" ))
27 (pt 176 8) 27 (pt 176 8)
28 (drawing 28 (drawing
29 (line (pt 92 12)(pt 117 12)) 29 (line (pt 92 12)(pt 117 12))
@@ -39,7 +39,7 @@ applicable agreement for further details.
39 (input) 39 (input)
40 (rect 48 56 224 72) 40 (rect 48 56 224 72)
41 (text "INPUT" (rect 133 0 161 10)(font "Arial" (font_size 6))) 41 (text "INPUT" (rect 133 0 161 10)(font "Arial" (font_size 6)))
42 (text "fan_speed[1..0]" (rect 5 0 82 11)(font "Arial" )) 42 (text "fan_speed[1..0]" (rect 5 0 81 11)(font "Arial" ))
43 (pt 176 8) 43 (pt 176 8)
44 (drawing 44 (drawing
45 (line (pt 92 12)(pt 117 12)) 45 (line (pt 92 12)(pt 117 12))
@@ -55,7 +55,7 @@ applicable agreement for further details.
55 (input) 55 (input)
56 (rect 56 72 224 88) 56 (rect 56 72 224 88)
57 (text "INPUT" (rect 125 0 153 10)(font "Arial" (font_size 6))) 57 (text "INPUT" (rect 125 0 153 10)(font "Arial" (font_size 6)))
58 (text "hot" (rect 5 0 21 11)(font "Arial" )) 58 (text "hot" (rect 5 0 20 11)(font "Arial" ))
59 (pt 168 8) 59 (pt 168 8)
60 (drawing 60 (drawing
61 (line (pt 84 12)(pt 109 12)) 61 (line (pt 84 12)(pt 109 12))
@@ -71,7 +71,7 @@ applicable agreement for further details.
71 (input) 71 (input)
72 (rect 56 24 224 40) 72 (rect 56 24 224 40)
73 (text "INPUT" (rect 125 0 153 10)(font "Arial" (font_size 6))) 73 (text "INPUT" (rect 125 0 153 10)(font "Arial" (font_size 6)))
74 (text "enable" (rect 5 0 39 11)(font "Arial" )) 74 (text "enable" (rect 5 0 38 11)(font "Arial" ))
75 (pt 168 8) 75 (pt 168 8)
76 (drawing 76 (drawing
77 (line (pt 84 12)(pt 109 12)) 77 (line (pt 84 12)(pt 109 12))
@@ -85,7 +85,7 @@ applicable agreement for further details.
85) 85)
86(pin 86(pin
87 (output) 87 (output)
88 (rect 544 24 720 40) 88 (rect 664 24 840 40)
89 (text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6))) 89 (text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6)))
90 (text "fan_auto" (rect 90 0 133 11)(font "Arial" )) 90 (text "fan_auto" (rect 90 0 133 11)(font "Arial" ))
91 (pt 0 8) 91 (pt 0 8)
@@ -101,7 +101,7 @@ applicable agreement for further details.
101) 101)
102(pin 102(pin
103 (output) 103 (output)
104 (rect 544 40 720 56) 104 (rect 664 40 840 56)
105 (text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6))) 105 (text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6)))
106 (text "speed[1..0]" (rect 90 0 145 11)(font "Arial" )) 106 (text "speed[1..0]" (rect 90 0 145 11)(font "Arial" ))
107 (pt 0 8) 107 (pt 0 8)
@@ -116,297 +116,294 @@ applicable agreement for further details.
116 ) 116 )
117) 117)
118(symbol 118(symbol
119 (rect 352 24 416 72) 119 (rect 368 440 480 528)
120 (text "AND2" (rect 1 0 28 10)(font "Arial" (font_size 6))) 120 (text "BUSMUX" (rect 28 0 95 16)(font "Arial" (font_size 10)))
121 (text "inst" (rect 3 37 20 48)(font "Arial" )) 121 (text "inst1" (rect 3 77 26 88)(font "Arial" ))
122 (port 122 (port
123 (pt 0 16) 123 (pt 0 64)
124 (input) 124 (input)
125 (text "IN1" (rect 2 7 22 18)(font "Courier New" (bold))(invisible)) 125 (text "datab[WIDTH-1..0]" (rect 6 51 111 64)(font "Arial" (font_size 8)))
126 (text "IN1" (rect 2 7 22 18)(font "Courier New" (bold))(invisible)) 126 (text "datab[]" (rect 6 51 44 64)(font "Arial" (font_size 8)))
127 (line (pt 0 16)(pt 14 16)) 127 (line (pt 0 64)(pt 44 64)(line_width 3))
128 )
129 (port
130 (pt 56 88)
131 (input)
132 (text "sel" (rect 59 70 75 83)(font "Arial" (font_size 8)))
133 (text "sel" (rect 59 70 75 83)(font "Arial" (font_size 8)))
134 (line (pt 56 88)(pt 56 72))
128 ) 135 )
129 (port 136 (port
130 (pt 0 32) 137 (pt 0 32)
131 (input) 138 (input)
132 (text "IN2" (rect 2 23 22 34)(font "Courier New" (bold))(invisible)) 139 (text "dataa[WIDTH-1..0]" (rect 6 19 111 32)(font "Arial" (font_size 8)))
133 (text "IN2" (rect 2 23 22 34)(font "Courier New" (bold))(invisible)) 140 (text "dataa[]" (rect 6 19 44 32)(font "Arial" (font_size 8)))
134 (line (pt 0 32)(pt 14 32)) 141 (line (pt 0 32)(pt 44 32)(line_width 3))
135 ) 142 )
136 (port 143 (port
137 (pt 64 24) 144 (pt 112 48)
138 (output) 145 (output)
139 (text "OUT" (rect 48 15 68 26)(font "Courier New" (bold))(invisible)) 146 (text "result[WIDTH-1..0]" (rect 75 35 180 48)(font "Arial" (font_size 8)))
140 (text "OUT" (rect 48 15 68 26)(font "Courier New" (bold))(invisible)) 147 (text "result[]" (rect 75 35 112 48)(font "Arial" (font_size 8)))
141 (line (pt 42 24)(pt 64 24)) 148 (line (pt 68 48)(pt 112 48)(line_width 3))
149 )
150 (parameter
151 "WIDTH"
152 "2"
153 "Width of I/O, any integer > 0"
154 " 1" " 2" " 3" " 4" " 5" " 6" " 7" " 8" " 9" "10" "11" "12" "13" "14" "15" "16" "20" "24" "28" "32" "40" "48" "56" "64"
142 ) 155 )
143 (drawing 156 (drawing
144 (line (pt 14 12)(pt 30 12)) 157 (text "0" (rect 52 31 59 41)(font "Arial" (font_size 6)))
145 (line (pt 14 37)(pt 31 37)) 158 (text "1" (rect 52 55 57 65)(font "Arial" (font_size 6)))
146 (line (pt 14 12)(pt 14 37)) 159 (line (pt 68 64)(pt 68 32))
147 (arc (pt 31 37)(pt 30 12)(rect 18 12 43 37)) 160 (line (pt 44 80)(pt 44 16))
161 (line (pt 44 16)(pt 68 32))
162 (line (pt 44 80)(pt 68 64))
148 ) 163 )
164 (annotation_block (parameter)(rect 480 408 600 434))
149) 165)
150(symbol 166(symbol
151 (rect 360 216 408 248) 167 (rect 368 256 480 344)
152 (text "NOT" (rect 1 0 21 10)(font "Arial" (font_size 6))) 168 (text "BUSMUX" (rect 28 0 95 16)(font "Arial" (font_size 10)))
153 (text "inst2" (rect 3 21 26 32)(font "Arial" )) 169 (text "inst3" (rect 3 77 26 88)(font "Arial" ))
154 (port 170 (port
155 (pt 0 16) 171 (pt 0 64)
156 (input) 172 (input)
157 (text "IN" (rect 2 7 16 18)(font "Courier New" (bold))(invisible)) 173 (text "datab[WIDTH-1..0]" (rect 6 51 111 64)(font "Arial" (font_size 8)))
158 (text "IN" (rect 2 7 16 18)(font "Courier New" (bold))(invisible)) 174 (text "datab[]" (rect 6 51 44 64)(font "Arial" (font_size 8)))
159 (line (pt 0 16)(pt 13 16)) 175 (line (pt 0 64)(pt 44 64)(line_width 3))
160 ) 176 )
161 (port 177 (port
162 (pt 48 16) 178 (pt 56 88)
163 (output)
164 (text "OUT" (rect 32 7 52 18)(font "Courier New" (bold))(invisible))
165 (text "OUT" (rect 32 7 52 18)(font "Courier New" (bold))(invisible))
166 (line (pt 39 16)(pt 48 16))
167 )
168 (drawing
169 (line (pt 13 25)(pt 13 7))
170 (line (pt 13 7)(pt 31 16))
171 (line (pt 13 25)(pt 31 16))
172 (circle (rect 31 12 39 20))
173 )
174)
175(symbol
176 (rect 352 152 416 200)
177 (text "AND2" (rect 1 0 28 10)(font "Arial" (font_size 6)))
178 (text "inst4" (rect 3 37 26 48)(font "Arial" ))
179 (port
180 (pt 0 16)
181 (input) 179 (input)
182 (text "IN1" (rect 2 7 22 18)(font "Courier New" (bold))(invisible)) 180 (text "sel" (rect 59 70 75 83)(font "Arial" (font_size 8)))
183 (text "IN1" (rect 2 7 22 18)(font "Courier New" (bold))(invisible)) 181 (text "sel" (rect 59 70 75 83)(font "Arial" (font_size 8)))
184 (line (pt 0 16)(pt 14 16)) 182 (line (pt 56 88)(pt 56 72))
185 ) 183 )
186 (port 184 (port
187 (pt 0 32) 185 (pt 0 32)
188 (input) 186 (input)
189 (text "IN2" (rect 2 23 22 34)(font "Courier New" (bold))(invisible)) 187 (text "dataa[WIDTH-1..0]" (rect 6 19 111 32)(font "Arial" (font_size 8)))
190