Use only 14MHz clk from bus

This commit is contained in:
Roman Boykov 2024-02-14 16:19:40 +03:00
parent 48f31950f0
commit ced4d07ab8
8 changed files with 73 additions and 74 deletions

View File

@ -7,19 +7,19 @@ module ClockGenerator (
output reg sj_clk // Clock for sega joystick
);
reg [6:0] clk_ctr;
localparam [6:0] divisor = 120;
reg [5:0] clk_ctr;
localparam [5:0] divisor = 34;
//assign sj_clk = clk_ctr[7];
always_ff @ (posedge clk, posedge reset)
if (reset) begin
clk_ctr <= 7'h00;
clk_ctr <= 6'h00;
sj_clk <= 1'b0;
end
else begin
if (clk_ctr == divisor) begin
clk_ctr <= 7'h00;
clk_ctr <= 6'h00;
sj_clk <= !sj_clk;
end
else clk_ctr <= clk_ctr + 1'b1;

View File

@ -65,7 +65,6 @@ set_location_assignment PIN_2 -to a[9]
set_location_assignment PIN_5 -to a[10]
set_location_assignment PIN_6 -to a[11]
set_location_assignment PIN_90 -to clk14
set_location_assignment PIN_87 -to clk50
set_location_assignment PIN_12 -to d[0]
set_location_assignment PIN_13 -to d[1]
set_location_assignment PIN_14 -to d[2]
@ -80,9 +79,9 @@ set_global_assignment -name SYSTEMVERILOG_FILE ClockGenerator.sv
set_global_assignment -name SYSTEMVERILOG_FILE SegaJoy.sv
set_global_assignment -name USE_CONFIGURATION_DEVICE ON
set_global_assignment -name RESERVE_ALL_UNUSED_PINS_NO_OUTPUT_GND "AS INPUT TRI-STATED"
set_location_assignment PIN_35 -to sj1[5]
set_location_assignment PIN_36 -to sj1[5]
set_location_assignment PIN_29 -to sj1[4]
set_location_assignment PIN_76 -to sj1[3]
set_location_assignment PIN_35 -to sj1[3]
set_location_assignment PIN_32 -to sj1[2]
set_location_assignment PIN_30 -to sj1[1]
set_location_assignment PIN_28 -to sj1[0]

Binary file not shown.

View File

@ -6,7 +6,7 @@ module SprinterJoy (
// Сигналы шины ISA
input wire clk14, // 14MHz ISA Clock
input wire clk50, // 50MHz Oscillator Clock
//input wire clk50, // 50MHz Oscillator Clock
input wire reset, // ISA RESET
input wire ior_n, // ISA -IOR
@ -46,7 +46,7 @@ module SprinterJoy (
ClockGenerator clockGenerator(
.clk(clk50),
.clk(clk14),
.reset(reset),
.sj_clk(sj_clk)
);

View File

@ -1,10 +1,10 @@
/* Quartus II 32-bit Version 13.0.1 Build 232 06/12/2013 Service Pack 1 SJ Web Edition */
/* Quartus II 64-Bit Version 13.0.1 Build 232 06/12/2013 Service Pack 1 SJ Web Edition */
JedecChain;
FileRevision(JESD32A);
DefaultMfr(6E);
P ActionCode(Cfg)
Device PartName(EPM3128AT100) Path("/home/roma/projects/hobby/PC/Sprinter/SprinterJoy/Firmware/output_files/") File("SprinterJoy.pof") MfrSpec(OpMask(7));
Device PartName(EPM7128ST100) Path("/home/roma/projects/hobby/PC/Sprinter/SprinterJoy/Firmware/output_files/") File("SprinterJoy.pof") MfrSpec(OpMask(1));
ChainEnd;

View File

@ -1,8 +1,8 @@
<sld_project_info>
<project>
<hash md5_digest_80b="5c54dd77ebe72cc6ded9"/>
<hash md5_digest_80b="b01bdc654668eb400c40"/>
</project>
<file_info>
<file device="EPM3128ATC100-10" path="SprinterJoy.sof" usercode="0x00000000"/>
<file device="EPM7128STC100-10" path="SprinterJoy.sof" usercode="0x00000000"/>
</file_info>
</sld_project_info>

View File

@ -23,7 +23,7 @@
---------------------------------------------------------------------------------
-- NC : No Connect. This pin has no internal connection to the device.
-- DNU : Do Not Use. This pin MUST NOT be connected.
-- VCCINT : Dedicated power pin, which MUST be connected to VCC (3.3V).
-- VCC : Dedicated power pin, which MUST be connected to VCC.
-- VCCIO : Dedicated power pin, which MUST be connected to VCC
-- of its bank.
-- GND : Dedicated ground pin. Dedicated GND pins MUST be connected to GND.
@ -56,64 +56,64 @@
-- Pin directions (input, output or bidir) are based on device operating in user mode.
---------------------------------------------------------------------------------
Quartus II 32-bit Version 13.0.1 Build 232 06/12/2013 Service Pack 1 SJ Web Edition
CHIP "SprinterJoy" ASSIGNED TO AN: EPM3128ATC100-10
Quartus II 64-Bit Version 13.0.1 Build 232 06/12/2013 Service Pack 1 SJ Web Edition
CHIP "SprinterJoy" ASSIGNED TO AN: EPM7128STC100-10
Pin Name/Usage : Location : Dir. : I/O Standard : Voltage : I/O Bank : User Assignment
-------------------------------------------------------------------------------------------------------------
a[8] : 1 : input : 3.3-V LVTTL : : : Y
a[9] : 2 : input : 3.3-V LVTTL : : : Y
VCCIO : 3 : power : : 3.3V : :
TDI : 4 : input : 3.3-V LVTTL : : : Y
a[10] : 5 : input : 3.3-V LVTTL : : : Y
a[11] : 6 : input : 3.3-V LVTTL : : : Y
a[12] : 7 : input : 3.3-V LVTTL : : : Y
a[13] : 8 : input : 3.3-V LVTTL : : : Y
a[14] : 9 : input : 3.3-V LVTTL : : : Y
a[15] : 10 : input : 3.3-V LVTTL : : : Y
a[8] : 1 : input : TTL : : : Y
a[9] : 2 : input : TTL : : : Y
VCCIO : 3 : power : : 5.0V : :
TDI : 4 : input : TTL : : : N
a[10] : 5 : input : TTL : : : Y
a[11] : 6 : input : TTL : : : Y
RESERVED_INPUT : 7 : : : : :
RESERVED_INPUT : 8 : : : : :
RESERVED_INPUT : 9 : : : : :
RESERVED_INPUT : 10 : : : : :
GND : 11 : gnd : : : :
d[0] : 12 : bidir : 3.3-V LVTTL : : : Y
d[1] : 13 : bidir : 3.3-V LVTTL : : : Y
d[2] : 14 : bidir : 3.3-V LVTTL : : : Y
TMS : 15 : input : 3.3-V LVTTL : : : Y
d[3] : 16 : bidir : 3.3-V LVTTL : : : Y
d[4] : 17 : bidir : 3.3-V LVTTL : : : Y
VCCIO : 18 : power : : 3.3V : :
d[5] : 19 : bidir : 3.3-V LVTTL : : : Y
d[6] : 20 : bidir : 3.3-V LVTTL : : : Y
d[7] : 21 : bidir : 3.3-V LVTTL : : : Y
d[0] : 12 : bidir : TTL : : : Y
d[1] : 13 : bidir : TTL : : : Y
d[2] : 14 : bidir : TTL : : : Y
TMS : 15 : input : TTL : : : N
d[3] : 16 : bidir : TTL : : : Y
d[4] : 17 : bidir : TTL : : : Y
VCCIO : 18 : power : : 5.0V : :
d[5] : 19 : bidir : TTL : : : Y
d[6] : 20 : bidir : TTL : : : Y
d[7] : 21 : bidir : TTL : : : Y
RESERVED_INPUT : 22 : : : : :
RESERVED_INPUT : 23 : : : : :
ior_n : 24 : input : 3.3-V LVTTL : : : Y
ior_n : 24 : input : TTL : : : Y
RESERVED_INPUT : 25 : : : : :
GND : 26 : gnd : : : :
RESERVED_INPUT : 27 : : : : :
sj1[0] : 28 : input : 3.3-V LVTTL : : : Y
sj1[4] : 29 : input : 3.3-V LVTTL : : : Y
sj1[1] : 30 : input : 3.3-V LVTTL : : : Y
sj1_sel : 31 : output : 3.3-V LVTTL : : : Y
sj1[2] : 32 : input : 3.3-V LVTTL : : : Y
GND : 33 : gnd : : : :
VCCIO : 34 : power : : 3.3V : :
sj1[3] : 35 : input : 3.3-V LVTTL : : : Y
sj1[5] : 36 : input : 3.3-V LVTTL : : : Y
sj1[0] : 28 : input : TTL : : : Y
sj1[4] : 29 : input : TTL : : : Y
sj1[1] : 30 : input : TTL : : : Y
sj1_sel : 31 : output : TTL : : : Y
sj1[2] : 32 : input : TTL : : : Y
RESERVED_INPUT : 33 : : : : :
VCCIO : 34 : power : : 5.0V : :
sj1[3] : 35 : input : TTL : : : Y
sj1[5] : 36 : input : TTL : : : Y
RESERVED_INPUT : 37 : : : : :
GND : 38 : gnd : : : :
VCCINT : 39 : power : : 3.3V : :
VCCINT : 39 : power : : 5.0V : :
RESERVED_INPUT : 40 : : : : :
RESERVED_INPUT : 41 : : : : :
RESERVED_INPUT : 42 : : : : :
GND : 43 : gnd : : : :
sj2[0] : 44 : input : 3.3-V LVTTL : : : Y
sj2[4] : 45 : input : 3.3-V LVTTL : : : Y
sj2[1] : 46 : input : 3.3-V LVTTL : : : Y
sj2_sel : 47 : output : 3.3-V LVTTL : : : Y
sj2[2] : 48 : input : 3.3-V LVTTL : : : Y
sj2[3] : 49 : input : 3.3-V LVTTL : : : Y
sj2[5] : 50 : input : 3.3-V LVTTL : : : Y
VCCIO : 51 : power : : 3.3V : :
sj2[0] : 44 : input : TTL : : : Y
sj2[4] : 45 : input : TTL : : : Y
sj2[1] : 46 : input : TTL : : : Y
sj2_sel : 47 : output : TTL : : : Y
sj2[2] : 48 : input : TTL : : : Y
sj2[3] : 49 : input : TTL : : : Y
sj2[5] : 50 : input : TTL : : : Y
VCCIO : 51 : power : : 5.0V : :
RESERVED_INPUT : 52 : : : : :
GND : 53 : gnd : : : :
RESERVED_INPUT : 53 : : : : :
RESERVED_INPUT : 54 : : : : :
RESERVED_INPUT : 55 : : : : :
RESERVED_INPUT : 56 : : : : :
@ -122,42 +122,42 @@ RESERVED_INPUT : 58 : : :
GND : 59 : gnd : : : :
RESERVED_INPUT : 60 : : : : :
RESERVED_INPUT : 61 : : : : :
TCK : 62 : input : 3.3-V LVTTL : : : Y
TCK : 62 : input : TTL : : : N
RESERVED_INPUT : 63 : : : : :
RESERVED_INPUT : 64 : : : : :
GND : 65 : gnd : : : :
VCCIO : 66 : power : : 3.3V : :
RESERVED_INPUT : 65 : : : : :
VCCIO : 66 : power : : 5.0V : :
RESERVED_INPUT : 67 : : : : :
RESERVED_INPUT : 68 : : : : :
RESERVED_INPUT : 69 : : : : :
RESERVED_INPUT : 70 : : : : :
RESERVED_INPUT : 71 : : : : :
RESERVED_INPUT : 72 : : : : :
TDO : 73 : output : 3.3-V LVTTL : : : Y
TDO : 73 : output : TTL : : : N
GND : 74 : gnd : : : :
RESERVED_INPUT : 75 : : : : :
RESERVED_INPUT : 76 : : : : :
RESERVED_INPUT : 77 : : : : :
GND : 78 : gnd : : : :
RESERVED_INPUT : 78 : : : : :
RESERVED_INPUT : 79 : : : : :
RESERVED_INPUT : 80 : : : : :
RESERVED_INPUT : 81 : : : : :
VCCIO : 82 : power : : 3.3V : :
VCCIO : 82 : power : : 5.0V : :
RESERVED_INPUT : 83 : : : : :
RESERVED_INPUT : 84 : : : : :
RESERVED_INPUT : 85 : : : : :
GND : 86 : gnd : : : :
clk50 : 87 : input : 3.3-V LVTTL : : : Y
GND+ : 87 : : : : :
GND+ : 88 : : : : :
reset : 89 : input : 3.3-V LVTTL : : : Y
clk14 : 90 : input : 3.3-V LVTTL : : : Y
VCCINT : 91 : power : : 3.3V : :
a[0] : 92 : input : 3.3-V LVTTL : : : Y
a[1] : 93 : input : 3.3-V LVTTL : : : Y
a[2] : 94 : input : 3.3-V LVTTL : : : Y
reset : 89 : input : TTL : : : Y
clk14 : 90 : input : TTL : : : Y
VCCINT : 91 : power : : 5.0V : :
a[0] : 92 : input : TTL : : : Y
a[1] : 93 : input : TTL : : : Y
a[2] : 94 : input : TTL : : : Y
GND : 95 : gnd : : : :
a[3] : 96 : input : 3.3-V LVTTL : : : Y
a[4] : 97 : input : 3.3-V LVTTL : : : Y
a[5] : 98 : input : 3.3-V LVTTL : : : Y
a[6] : 99 : input : 3.3-V LVTTL : : : Y
a[7] : 100 : input : 3.3-V LVTTL : : : Y
a[3] : 96 : input : TTL : : : Y
a[4] : 97 : input : TTL : : : Y
a[5] : 98 : input : TTL : : : Y
a[6] : 99 : input : TTL : : : Y
a[7] : 100 : input : TTL : : : Y