URL
https://opencores.org/ocsvn/ag_6502/ag_6502/trunk
[/] [ag_6502/] [trunk/] [digger/] [ag_main.v] - Diff between revs 5 and 8
Show entire file |
Details |
Blame |
View Log
Rev 5 |
Rev 8 |
Line 43... |
Line 43... |
reg[7:0] R;
|
reg[7:0] R;
|
assign DO = CS? R: 8'bZ;
|
assign DO = CS? R: 8'bZ;
|
always @(posedge CLK) if (CS) if (READ) R <= mem[AB]; else mem[AB] <= DI;
|
always @(posedge CLK) if (CS) if (READ) R <= mem[AB]; else mem[AB] <= DI;
|
endmodule
|
endmodule
|
|
|
|
|
module ag_main(
|
module ag_main(
|
input clk50,
|
input clk50x,
|
input[4:0] btns,
|
input[4:0] btns,
|
input[3:0] switches,
|
input[3:0] switches,
|
output[7:0] leds,
|
output[7:0] leds,
|
output[3:0] controls,
|
output[3:0] controls,
|
output[4:0] vga_bus,
|
output[4:0] vga_bus,
|
input[1:0] ps2_bus_in,
|
input[1:0] ps2_bus_in,
|
output clk_cpu
|
output clk_cpu
|
);
|
);
|
|
|
wire clk1, clk1x, clk10;
|
wire clk1, clk1x, clk10, clk50;
|
reg turbo = 0;
|
reg turbo = 0;
|
|
BUFG bg1(clk50, clk50x);
|
clk_div#5 cd5(clk50, clk10);
|
clk_div#5 cd5(clk50, clk10);
|
clk_div#10 cd10(clk10, clk1x);
|
clk_div#10 cd10(clk10, clk1x);
|
assign clk1 = turbo?clk10:clk1x;
|
BUFGMUX bgm1(clk1, clk1x, clk10, turbo);
|
|
// assign clk1 = turbo?clk10:clk1x;
|
|
|
|
|
wire clk_vram;
|
wire clk_vram;
|
wire[13:0] AB2;
|
wire[13:0] AB2;
|
wire[15:0] DI2;
|
wire[15:0] DI2;
|
© copyright 1999-2025
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.