File tree 2 files changed +16
-14
lines changed
2 files changed +16
-14
lines changed Original file line number Diff line number Diff line change 1
1
input CLK_68KCLKB,
2
- input nSDROE, nSDRMPX ,
3
- input nSDPOE, nSDPMPX ,
2
+ input nSDROE, SDRMPX ,
3
+ input nSDPOE, SDPMPX ,
4
4
inout [7 :0 ] SDRAD,
5
5
input [9 :8 ] SDRA,
6
6
input [23 :20 ] SDRA,
@@ -15,27 +15,26 @@ reg [7:0] PDLATCH;
15
15
reg [23 :0 ] RALATCH;
16
16
reg [23 :0 ] PALATCH;
17
17
18
- assign SDRMPX = ~ nSDRMPX ;
19
- assign SDPMPX = ~ nSDPMPX ;
18
+ assign nSDRMPX = ~ SDRMPX ;
19
+ assign nSDPMPX = ~ SDPMPX ;
20
20
assign SDPOE = ~ nSDPOE;
21
- assign nCEN = COUNT[1 ];
22
- assign nCLR = nSDPOE;
21
+ assign CEN = ~ COUNT[1 ];
23
22
24
- always @(posedge CLK_68KCLKB)
23
+ always @(posedge CLK_68KCLKB or negedge nSDPOE )
25
24
begin
26
- if (! nCLR )
27
- COUNT <= 2'b0 ;
25
+ if (! nSDPOE )
26
+ COUNT <= 0 ;
28
27
else
29
- if (! nCEN ) COUNT <= COUNT + 1'b1 ;
28
+ if (CEN ) COUNT <= COUNT + 1'b1 ;
30
29
end
31
30
32
31
assign SDRAD = nSDROE ? 8'bzzzzzzzz : RDLATCH;
33
- always @(nCEN )
34
- if (nCEN ) RDLATCH <= D;
32
+ always @(* )
33
+ if (COUNT[ 1 ] ) RDLATCH <= D;
35
34
36
35
assign SDPAD = nSDPOE ? 8'bzzzzzzzz : PDLATCH;
37
- always @(SDPOE )
38
- if (SDPOE ) PDLATCH <= D;
36
+ always @(* )
37
+ if (! nSDPOE ) PDLATCH <= D;
39
38
40
39
assign A = nSDPOE ? RALATCH : PALATCH;
41
40
Original file line number Diff line number Diff line change
1
+ // Altera EPM7128 CPLD used in King Of Fighters '98 as protection device
2
+
3
+ // To do...
You can’t perform that action at this time.
0 commit comments