Skip to content

Commit e65ea23

Browse files
committed
changed dip switches so that one switch does both background and foreground color, freeing up other dip switch
1 parent cebbeb8 commit e65ea23

File tree

8 files changed

+8890
-9073
lines changed

8 files changed

+8890
-9073
lines changed

M4ToVGA_top.bdf

Lines changed: 454 additions & 486 deletions
Large diffs are not rendered by default.

M4ToVGA_top.qsf

Lines changed: 60 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -129,36 +129,6 @@ set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to LEDS1
129129
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to LEDS0
130130
set_global_assignment -name TIMING_ANALYZER_MULTICORNER_ANALYSIS ON
131131
set_global_assignment -name SDC_FILE M4ToVGA_top.sdc
132-
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to highestDotCount[9]
133-
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to highestDotCount[8]
134-
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to highestDotCount[7]
135-
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to highestDotCount[6]
136-
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to highestDotCount[5]
137-
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to highestDotCount[4]
138-
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to highestDotCount[3]
139-
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to highestDotCount[2]
140-
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to highestDotCount[1]
141-
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to highestDotCount[0]
142-
set_location_assignment PIN_60 -to highestDotCount[9]
143-
set_location_assignment PIN_65 -to highestDotCount[8]
144-
set_location_assignment PIN_67 -to highestDotCount[7]
145-
set_location_assignment PIN_69 -to highestDotCount[6]
146-
set_location_assignment PIN_71 -to highestDotCount[5]
147-
set_location_assignment PIN_73 -to highestDotCount[4]
148-
set_location_assignment PIN_75 -to highestDotCount[3]
149-
set_location_assignment PIN_77 -to highestDotCount[2]
150-
set_location_assignment PIN_83 -to highestDotCount[1]
151-
set_location_assignment PIN_85 -to highestDotCount[0]
152-
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to highestDotCount[0]
153-
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to highestDotCount[1]
154-
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to highestDotCount[2]
155-
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to highestDotCount[3]
156-
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to highestDotCount[4]
157-
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to highestDotCount[5]
158-
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to highestDotCount[6]
159-
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to highestDotCount[7]
160-
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to highestDotCount[8]
161-
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to highestDotCount[9]
162132
set_global_assignment -name SYSTEMVERILOG_FILE LEDInverter.sv
163133
set_location_assignment PIN_87 -to OutputLEDB[9]
164134
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to OutputLEDB[9]
@@ -195,28 +165,64 @@ set_instance_assignment -name SLEW_RATE 0 -to OutputLEDB[8]
195165
set_instance_assignment -name SLEW_RATE 0 -to OutputLEDB[7]
196166
set_instance_assignment -name SLEW_RATE 0 -to OutputLEDB[6]
197167
set_instance_assignment -name SLEW_RATE 0 -to OutputLEDB[5]
198-
set_location_assignment PIN_55 -to FG_R1
199-
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to FG_R1
200-
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to FG_R0
201-
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to FG_G1
202-
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to FG_G0
203-
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to FG_B1
204-
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to FG_B0
205-
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to BG_R1
206-
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to BG_R0
207-
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to BG_G1
208-
set_instance_assignment -name IO_STANDARD "3.0-V LVTTL" -to BG_G0
209-
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to BG_B1
210-
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to BG_B0
211-
set_location_assignment PIN_53 -to FG_R0
212-
set_location_assignment PIN_51 -to FG_G1
213-
set_location_assignment PIN_49 -to FG_G0
214-
set_location_assignment PIN_44 -to FG_B1
215-
set_location_assignment PIN_42 -to FG_B0
216-
set_location_assignment PIN_126 -to BG_B0
217-
set_location_assignment PIN_128 -to BG_B1
218-
set_location_assignment PIN_132 -to BG_G0
219-
set_location_assignment PIN_135 -to BG_G1
220-
set_location_assignment PIN_137 -to BG_R0
221-
set_location_assignment PIN_141 -to BG_R1
168+
set_location_assignment PIN_126 -to BG_B
169+
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to BG_B
170+
set_location_assignment PIN_132 -to BG_R
171+
set_location_assignment PIN_128 -to BG_G
172+
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to BG_G
173+
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to BG_R
174+
set_location_assignment PIN_141 -to FG_R
175+
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to FG_R
176+
set_location_assignment PIN_137 -to FG_G
177+
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to FG_G
178+
set_location_assignment PIN_135 -to FG_B
179+
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to FG_B
180+
set_location_assignment PIN_42 -to H_0
181+
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to H_0
182+
set_location_assignment PIN_44 -to H_1
183+
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to H_1
184+
set_location_assignment PIN_49 -to H_2
185+
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to H_2
186+
set_location_assignment PIN_51 -to H_3
187+
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to H_3
188+
set_location_assignment PIN_53 -to H_4
189+
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to H_4
190+
set_location_assignment PIN_55 -to H_5
191+
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to H_5
192+
set_instance_assignment -name SLEW_RATE 0 -to vb[1]
193+
set_instance_assignment -name SLEW_RATE 0 -to vr[1]
194+
set_instance_assignment -name SLEW_RATE 0 -to vg[1]
195+
set_instance_assignment -name SLEW_RATE 0 -to vb[0]
196+
set_instance_assignment -name SLEW_RATE 0 -to vr[0]
197+
set_instance_assignment -name SLEW_RATE 0 -to vg[0]
198+
set_location_assignment PIN_60 -to OutputLEDA[9]
199+
set_location_assignment PIN_65 -to OutputLEDA[8]
200+
set_location_assignment PIN_67 -to OutputLEDA[7]
201+
set_location_assignment PIN_69 -to OutputLEDA[6]
202+
set_location_assignment PIN_71 -to OutputLEDA[5]
203+
set_location_assignment PIN_73 -to OutputLEDA[4]
204+
set_location_assignment PIN_75 -to OutputLEDA[3]
205+
set_location_assignment PIN_77 -to OutputLEDA[2]
206+
set_location_assignment PIN_83 -to OutputLEDA[1]
207+
set_location_assignment PIN_85 -to OutputLEDA[0]
208+
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to OutputLEDA[9]
209+
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to OutputLEDA[8]
210+
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to OutputLEDA[7]
211+
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to OutputLEDA[6]
212+
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to OutputLEDA[5]
213+
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to OutputLEDA[4]
214+
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to OutputLEDA[3]
215+
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to OutputLEDA[2]
216+
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to OutputLEDA[1]
217+
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to OutputLEDA[0]
218+
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to OutputLEDA[9]
219+
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to OutputLEDA[8]
220+
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to OutputLEDA[7]
221+
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to OutputLEDA[6]
222+
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to OutputLEDA[5]
223+
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to OutputLEDA[4]
224+
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to OutputLEDA[3]
225+
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to OutputLEDA[2]
226+
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to OutputLEDA[1]
227+
set_instance_assignment -name CURRENT_STRENGTH_NEW 8MA -to OutputLEDA[0]
222228
set_instance_assignment -name PARTITION_HIERARCHY root_partition -to | -section_id Top

m4_input.bsf

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,48 @@ https://fpgasoftware.intel.com/eula.
5252
(text "dotclk" (rect 21 75 43 87)(font "Arial" ))
5353
(line (pt 0 80)(pt 16 80)(line_width 1))
5454
)
55+
(port
56+
(pt 0 96)
57+
(input)
58+
(text "H_0" (rect 0 0 17 12)(font "Arial" ))
59+
(text "H_0" (rect 21 91 38 103)(font "Arial" ))
60+
(line (pt 0 96)(pt 16 96)(line_width 1))
61+
)
62+
(port
63+
(pt 0 112)
64+
(input)
65+
(text "H_1" (rect 0 0 16 12)(font "Arial" ))
66+
(text "H_1" (rect 21 107 37 119)(font "Arial" ))
67+
(line (pt 0 112)(pt 16 112)(line_width 1))
68+
)
69+
(port
70+
(pt 0 128)
71+
(input)
72+
(text "H_2" (rect 0 0 17 12)(font "Arial" ))
73+
(text "H_2" (rect 21 123 38 135)(font "Arial" ))
74+
(line (pt 0 128)(pt 16 128)(line_width 1))
75+
)
76+
(port
77+
(pt 0 144)
78+
(input)
79+
(text "H_3" (rect 0 0 17 12)(font "Arial" ))
80+
(text "H_3" (rect 21 139 38 151)(font "Arial" ))
81+
(line (pt 0 144)(pt 16 144)(line_width 1))
82+
)
83+
(port
84+
(pt 0 160)
85+
(input)
86+
(text "H_4" (rect 0 0 18 12)(font "Arial" ))
87+
(text "H_4" (rect 21 155 39 167)(font "Arial" ))
88+
(line (pt 0 160)(pt 16 160)(line_width 1))
89+
)
90+
(port
91+
(pt 0 176)
92+
(input)
93+
(text "H_5" (rect 0 0 17 12)(font "Arial" ))
94+
(text "H_5" (rect 21 171 38 183)(font "Arial" ))
95+
(line (pt 0 176)(pt 16 176)(line_width 1))
96+
)
5597
(port
5698
(pt 200 32)
5799
(output)

m4_input.sv

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ module m4_input (
2222
wren,
2323
leds0,leds1,leds2,leds3,
2424
outputLEDA,
25-
outputLEDB
25+
outputLEDB,
26+
H_0, H_1, H_2, H_3, H_4, H_5
2627
);
2728

2829
// inputs and outputs
@@ -36,6 +37,7 @@ module m4_input (
3637
output logic leds0,leds1,leds2,leds3;
3738
output logic [9:0] outputLEDA;
3839
output logic [9:0] outputLEDB;
40+
input H_0, H_1, H_2, H_3, H_4, H_5;
3941

4042
// registers
4143
reg [9:0] INCounterX;
@@ -48,6 +50,8 @@ module m4_input (
4850
reg hsync_r2;
4951
reg vsync_r;
5052
reg vsync_r2;
53+
reg h0_r,h1_r,h2_r,h3_r,h4_r,h5_r;
54+
reg h0_r2,h1_r2,h2_r2,h3_r2,h4_r2,h5_r2;
5155
reg [31:0] nextline_r;
5256
reg [31:0] nextline_r2;
5357
reg [31:0] oldlinectr;
@@ -92,13 +96,27 @@ begin
9296
end
9397

9498

95-
// probably don't need this any more... double flopping of sync signals
99+
// double flopping of some input signals
96100
always @(posedge dotclk)
97101
begin
98102
hsync_r2 <= hsync;
99103
hsync_r <= hsync_r2;
100104
vsync_r2 <= vsync;
101105
vsync_r <= vsync_r2;
106+
107+
h0_r <= H_0;
108+
h1_r <= H_1;
109+
h2_r <= H_2;
110+
h3_r <= H_3;
111+
h4_r <= H_4;
112+
h5_r <= H_5;
113+
114+
h0_r2 <= h0_r;
115+
h1_r2 <= h1_r;
116+
h2_r2 <= h2_r;
117+
h3_r2 <= h3_r;
118+
h4_r2 <= h4_r;
119+
h5_r2 <= h5_r;
102120
end
103121

104122

@@ -126,8 +144,13 @@ begin
126144
state_reg = NORMAL;
127145
end
128146

129-
outputLEDA = TRUNC9'(memCtr); // put memCtr in LED A indicator (normally 0)
130-
147+
//outputLEDA = TRUNC9'(memCtr); // put memCtr in LED A indicator (normally 0)
148+
outputLEDA[0] = h0_r2;
149+
outputLEDA[1] = h1_r2;
150+
outputLEDA[2] = h2_r2;
151+
outputLEDA[3] = h3_r2;
152+
outputLEDA[4] = h4_r2;
153+
outputLEDA[5] = h5_r2;
131154

132155
// this code turns on MEMCLEAR mode when we are switching between 64 and 80 column modes
133156
if(highestDotCount > 320) // ignore weird glitchy stuff

0 commit comments

Comments
 (0)