File tree Expand file tree Collapse file tree 1 file changed +19
-40
lines changed Expand file tree Collapse file tree 1 file changed +19
-40
lines changed Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ module Display(
123123reg [ 6 :0 ] char;
124124reg [11 :0 ] color;
125125reg [31 :0 ] data;
126- reg flip;
126+ reg flip;
127127reg [ 7 :0 ] locb;
128128reg [11 :0 ] off;
129129reg [11 :0 ] on;
@@ -139,29 +139,29 @@ module Display(
139139wire [12 :0 ]x ;
140140wire [10 :0 ] y;
141141
142- assign x = hCount- HVA+ 12'd8 ;
143- assign y= vCount- VVA;
144- assign col = x [2 :0 ];
145- assign row= y[2 :0 ];
142+ assign x = hCount- HVA+ 12'd8 ;
143+ assign y= vCount- VVA;
144+ assign col = x [2 :0 ];
145+ assign row= y[2 :0 ];
146146assign address= (y[9 :3 ]<< 8 )+ x [12 :3 ]+ 13'd1 ;
147147assign vgaRed= color[11 :8 ];
148- assign vgaGreen= color[7 :4 ];
149- assign vgaBlue = color[3 :0 ];
148+ assign vgaGreen = color[7 :4 ];
149+ assign vgaBlue = color[3 :0 ];
150150
151151CharSet acs (clock,temp,early);
152152locByte loc (data,row[1 :0 ],pixels);
153153
154154initial begin
155- Hsync<= ~ POL;
156- Vsync<= ~ POL;
157- char<= 7'd0 ;
158- color<= 12'd0 ;
159- data<= 32'd0 ;
160- hCount<= 11'd0 ;
161- on<= 12'd0 ;
162- off<= 12'd0 ;
163- temp<= 8'd0 ;
164- vCount<= 10'd0 ;
155+ Hsync<= ~ POL;
156+ Vsync<= ~ POL;
157+ char<= 7'd0 ;
158+ color<= 12'd0 ;
159+ data<= 32'd0 ;
160+ hCount<= 11'd0 ;
161+ on<= 12'd0 ;
162+ off<= 12'd0 ;
163+ temp<= 8'd0 ;
164+ vCount<= 10'd0 ;
165165end
166166
167167always @ (posedge clock) begin
@@ -200,34 +200,13 @@ module Display(
200200data<= early;
201201flip<= address[7 ];
202202off<= address[11 :0 ];
203- on<=~ address[11 :0 ];
203+ on<=~ address[11 :0 ];
204204end
205205end
206206endmodule
207207
208- module forth (
209- input wire i,
210- output reg o
211- );
212- reg t;
213-
214- initial begin
215- t<= 1'd0 ;
216- o<= 1'd0 ;
217- end
218-
219- always @(posedge i)begin
220- t<=~ t;
221- end
222-
223- always @(posedge t)begin
224- o<=~ o;
225- end
226-
227- endmodule
228-
229208module locByte (
230- input wire [31 :0 ] l,
209+ input wire [31 :0 ] l,
231210input wire [ 1 :0 ] s,
232211output wire [ 7 :0 ] b
233212);
You can’t perform that action at this time.
0 commit comments