OpenCores
URL https://opencores.org/ocsvn/a-z80/a-z80/trunk

Subversion Repositories a-z80

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /a-z80/trunk/cpu/control
    from Rev 8 to Rev 13
    Reverse comparison

Rev 8 → Rev 13

/decode_state.bdf
85,22 → 85,6
)
(pin
(input)
(rect 40 624 216 640)
(text "INPUT" (rect 133 0 161 10)(font "Arial" (font_size 6)))
(text "ctl_state_tbl_clr" (rect 9 0 86 12)(font "Arial" ))
(pt 176 8)
(drawing
(line (pt 92 12)(pt 117 12))
(line (pt 92 4)(pt 117 4))
(line (pt 121 8)(pt 176 8))
(line (pt 92 12)(pt 92 4))
(line (pt 117 4)(pt 121 8))
(line (pt 117 12)(pt 121 8))
)
(text "VCC" (rect 136 7 156 17)(font "Arial" (font_size 6)))
)
(pin
(input)
(rect 40 680 216 696)
(text "INPUT" (rect 133 0 161 10)(font "Arial" (font_size 6)))
(text "ctl_state_tbl_ed_set" (rect 9 0 108 12)(font "Arial" ))
244,6 → 228,38
(text "VCC" (rect 136 7 156 17)(font "Arial" (font_size 6)))
)
(pin
(input)
(rect 40 592 216 608)
(text "INPUT" (rect 133 0 161 10)(font "Arial" (font_size 6)))
(text "ctl_state_tbl_we" (rect 9 0 88 12)(font "Arial" ))
(pt 176 8)
(drawing
(line (pt 92 12)(pt 117 12))
(line (pt 92 4)(pt 117 4))
(line (pt 121 8)(pt 176 8))
(line (pt 92 12)(pt 92 4))
(line (pt 117 4)(pt 121 8))
(line (pt 117 12)(pt 121 8))
)
(text "VCC" (rect 136 7 156 17)(font "Arial" (font_size 6)))
)
(pin
(input)
(rect 40 624 216 640)
(text "INPUT" (rect 133 0 161 10)(font "Arial" (font_size 6)))
(text "hold_clk_wait" (rect 9 0 73 12)(font "Arial" ))
(pt 176 8)
(drawing
(line (pt 92 12)(pt 117 12))
(line (pt 92 4)(pt 117 4))
(line (pt 121 8)(pt 176 8))
(line (pt 92 12)(pt 92 4))
(line (pt 117 4)(pt 121 8))
(line (pt 117 12)(pt 121 8))
)
(text "VCC" (rect 136 7 156 17)(font "Arial" (font_size 6)))
)
(pin
(output)
(rect 640 384 816 400)
(text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6)))
393,7 → 409,7
(pt 64 24)
(output)
(text "OUT" (rect 48 15 65 27)(font "Courier New" (bold))(invisible))
(text "OUT" (rect 48 15 65 27)(font "Courier New" (bold))(invisible))
(text "OUT" (rect 48 15 62 27)(font "Courier New" (bold))(invisible))
(line (pt 48 24)(pt 64 24))
)
(drawing
405,46 → 421,6
)
)
(symbol
(rect 328 608 392 656)
(text "OR3" (rect 1 0 19 10)(font "Arial" (font_size 6)))
(text "inst1" (rect 3 37 30 51)(font "Arial" (font_size 8)))
(port
(pt 0 24)
(input)
(text "IN2" (rect 2 15 19 27)(font "Courier New" (bold))(invisible))
(text "IN2" (rect 2 15 19 27)(font "Courier New" (bold))(invisible))
(line (pt 0 24)(pt 18 24))
)
(port
(pt 0 32)
(input)
(text "IN3" (rect 2 24 19 36)(font "Courier New" (bold))(invisible))
(text "IN3" (rect 2 24 19 36)(font "Courier New" (bold))(invisible))
(line (pt 0 32)(pt 16 32))
)
(port
(pt 0 16)
(input)
(text "IN1" (rect 2 7 19 19)(font "Courier New" (bold))(invisible))
(text "IN1" (rect 2 7 19 19)(font "Courier New" (bold))(invisible))
(line (pt 0 16)(pt 16 16))
)
(port
(pt 64 24)
(output)
(text "OUT" (rect 47 15 64 27)(font "Courier New" (bold))(invisible))
(text "OUT" (rect 47 15 64 27)(font "Courier New" (bold))(invisible))
(line (pt 49 24)(pt 64 24))
)
(drawing
(line (pt 14 13)(pt 25 13))
(line (pt 14 36)(pt 25 36))
(arc (pt 7 29)(pt 7 19)(rect -14 8 19 41))
(arc (pt 49 24)(pt 25 13)(rect -6 13 57 76))
(arc (pt 25 35)(pt 49 24)(rect -6 -27 57 36))
)
)
(symbol
(rect 552 608 616 656)
(text "NOR2" (rect 1 0 26 10)(font "Arial" (font_size 6)))
(text "inst3" (rect 3 37 26 49)(font "Arial" ))
466,7 → 442,7
(pt 64 24)
(output)
(text "OUT" (rect 48 15 65 27)(font "Courier New" (bold))(invisible))
(text "OUT" (rect 48 15 65 27)(font "Courier New" (bold))(invisible))
(text "OUT" (rect 48 15 62 27)(font "Courier New" (bold))(invisible))
(line (pt 54 24)(pt 64 24))
)
(drawing
500,7 → 476,7
(pt 64 24)
(output)
(text "OUT" (rect 48 15 65 27)(font "Courier New" (bold))(invisible))
(text "OUT" (rect 48 15 65 27)(font "Courier New" (bold))(invisible))
(text "OUT" (rect 48 15 62 27)(font "Courier New" (bold))(invisible))
(line (pt 44 24)(pt 64 24))
)
(drawing
527,7 → 503,7
(pt 48 16)
(output)
(text "OUT" (rect 32 7 49 19)(font "Courier New" (bold))(invisible))
(text "OUT" (rect 32 7 49 19)(font "Courier New" (bold))(invisible))
(text "OUT" (rect 32 7 46 19)(font "Courier New" (bold))(invisible))
(line (pt 39 16)(pt 48 16))
)
(drawing
580,7 → 556,7
(pt 64 24)
(output)
(text "Q" (rect 45 20 50 32)(font "Courier New" (bold)))
(text "Q" (rect 43 20 48 32)(font "Courier New" (bold)))
(text "Q" (rect 43 20 47 32)(font "Courier New" (bold)))
(line (pt 52 24)(pt 64 24))
)
(drawing
616,7 → 592,7
(pt 64 24)
(output)
(text "OUT" (rect 48 15 65 27)(font "Courier New" (bold))(invisible))
(text "OUT" (rect 48 15 65 27)(font "Courier New" (bold))(invisible))
(text "OUT" (rect 48 15 62 27)(font "Courier New" (bold))(invisible))
(line (pt 48 24)(pt 64 24))
)
(drawing
670,7 → 646,7
(pt 64 24)
(output)
(text "Q" (rect 44 20 49 32)(font "Courier New" (bold)))
(text "Q" (rect 44 20 49 32)(font "Courier New" (bold)))
(text "Q" (rect 44 20 48 32)(font "Courier New" (bold)))
(line (pt 53 24)(pt 64 24))
)
(drawing
727,7 → 703,7
(pt 64 24)
(output)
(text "Q" (rect 44 20 49 32)(font "Courier New" (bold)))
(text "Q" (rect 44 20 49 32)(font "Courier New" (bold)))
(text "Q" (rect 44 20 48 32)(font "Courier New" (bold)))
(line (pt 53 24)(pt 64 24))
)
(drawing
784,7 → 760,7
(pt 64 24)
(output)
(text "Q" (rect 44 20 49 32)(font "Courier New" (bold)))
(text "Q" (rect 44 20 49 32)(font "Courier New" (bold)))
(text "Q" (rect 44 20 48 32)(font "Courier New" (bold)))
(line (pt 53 24)(pt 64 24))
)
(drawing
841,7 → 817,7
(pt 64 24)
(output)
(text "Q" (rect 44 20 49 32)(font "Courier New" (bold)))
(text "Q" (rect 44 20 49 32)(font "Courier New" (bold)))
(text "Q" (rect 44 20 48 32)(font "Courier New" (bold)))
(line (pt 53 24)(pt 64 24))
)
(drawing
898,7 → 874,7
(pt 64 24)
(output)
(text "Q" (rect 44 20 49 32)(font "Courier New" (bold)))
(text "Q" (rect 44 20 49 32)(font "Courier New" (bold)))
(text "Q" (rect 44 20 48 32)(font "Courier New" (bold)))
(line (pt 53 24)(pt 64 24))
)
(drawing
912,6 → 888,63
(circle (rect 28 68 36 76))
)
)
(symbol
(rect 312 584 376 632)
(text "AND2" (rect 1 0 25 10)(font "Arial" (font_size 6)))
(text "inst6" (rect 3 37 26 49)(font "Arial" ))
(port
(pt 0 16)
(input)
(text "IN1" (rect 2 7 19 19)(font "Courier New" (bold))(invisible))
(text "IN1" (rect 2 7 19 19)(font "Courier New" (bold))(invisible))
(line (pt 0 16)(pt 14 16))
)
(port
(pt 0 32)
(input)
(text "IN2" (rect 2 23 19 35)(font "Courier New" (bold))(invisible))
(text "IN2" (rect 2 23 19 35)(font "Courier New" (bold))(invisible))
(line (pt 0 32)(pt 14 32))
)
(port
(pt 64 24)
(output)
(text "OUT" (rect 48 15 65 27)(font "Courier New" (bold))(invisible))
(text "OUT" (rect 48 15 62 27)(font "Courier New" (bold))(invisible))
(line (pt 42 24)(pt 64 24))
)
(drawing
(line (pt 14 12)(pt 30 12))
(line (pt 14 37)(pt 31 37))
(line (pt 14 12)(pt 14 37))
(arc (pt 31 37)(pt 30 12)(rect 18 12 43 37))
)
)
(symbol
(rect 224 616 272 648)
(text "NOT" (rect 1 0 21 10)(font "Arial" (font_size 6)))
(text "inst8" (rect 3 21 26 33)(font "Arial" ))
(port
(pt 0 16)
(input)
(text "IN" (rect 2 7 13 19)(font "Courier New" (bold))(invisible))
(text "IN" (rect 2 7 13 19)(font "Courier New" (bold))(invisible))
(line (pt 0 16)(pt 13 16))
)
(port
(pt 48 16)
(output)
(text "OUT" (rect 32 7 49 19)(font "Courier New" (bold))(invisible))
(text "OUT" (rect 32 7 46 19)(font "Courier New" (bold))(invisible))
(line (pt 39 16)(pt 48 16))
)
(drawing
(line (pt 13 25)(pt 13 7))
(line (pt 13 7)(pt 31 16))
(line (pt 13 25)(pt 31 16))
(circle (rect 31 12 39 20))
)
)
(connector
(pt 376 104)
(pt 440 104)
1039,10 → 1072,6
(pt 472 472)
)
(connector
(pt 440 608)
(pt 408 608)
)
(connector
(pt 440 720)
(pt 408 720)
)
1077,30 → 1106,6
(pt 640 632)
)
(connector
(pt 248 688)
(pt 248 640)
)
(connector
(pt 248 640)
(pt 328 640)
)
(connector
(pt 248 624)
(pt 328 624)
)
(connector
(pt 248 576)
(pt 248 624)
)
(connector
(pt 408 632)
(pt 392 632)
)
(connector
(pt 216 632)
(pt 328 632)
)
(connector
(text "nreset" (rect 429 632 459 644)(font "Arial" ))
(pt 472 648)
(pt 424 648)
1127,30 → 1132,6
(pt 640 576)
)
(connector
(pt 216 688)
(pt 248 688)
)
(connector
(pt 248 688)
(pt 440 688)
)
(connector
(pt 216 576)
(pt 248 576)
)
(connector
(pt 248 576)
(pt 440 576)
)
(connector
(pt 408 608)
(pt 408 632)
)
(connector
(pt 408 632)
(pt 408 720)
)
(connector
(pt 472 632)
(pt 472 648)
)
1190,14 → 1171,52
(pt 472 912)
(pt 472 928)
)
(connector
(pt 216 576)
(pt 440 576)
)
(connector
(pt 216 688)
(pt 440 688)
)
(connector
(pt 288 616)
(pt 312 616)
)
(connector
(pt 408 608)
(pt 408 720)
)
(connector
(pt 376 608)
(pt 408 608)
)
(connector
(pt 408 608)
(pt 440 608)
)
(connector
(pt 216 600)
(pt 312 600)
)
(connector
(pt 224 632)
(pt 216 632)
)
(connector
(pt 288 616)
(pt 288 632)
)
(connector
(pt 288 632)
(pt 272 632)
)
(junction (pt 312 256))
(junction (pt 256 96))
(junction (pt 536 104))
(junction (pt 536 688))
(junction (pt 536 576))
(junction (pt 248 688))
(junction (pt 248 576))
(junction (pt 408 632))
(junction (pt 408 608))
(text "IX and IY state flags" (rect 416 32 551 48)(font "Arial" (font_size 10)))
(text "HALT state flag" (rect 432 328 537 344)(font "Arial" (font_size 10)))
(text "ALU feedback wire" (rect 392 960 519 976)(font "Arial" (font_size 10)))
1206,11 → 1225,11
(title_block
(rect 40 1024 297 1076)
(name "title-custom-small")
(section (rect 0 35 256 51)(text "DATE" (rect 2 0 30 12)(font "Arial" ))(text "August 9, 2014" (rect 56 3 143 17)(font "Arial" (font_size 8)))(border))
(section (rect 0 0 256 17)(text "PROJECT" (rect 2 0 52 12)(font "Arial" ))(text "A-Z80" (rect 56 2 94 17)(font "Arial" (font_size 9)(bold)))(border))
(section (rect 104 0 256 17)(text "MODULE" (rect 2 1 48 13)(font "Arial" ))(text "decode_state" (rect 43 2 135 17)(font "Arial" (font_size 9)(bold)))(border))
(section (rect 0 18 256 34)(text "DESIGNER" (rect 2 0 59 12)(font "Arial" ))(text "Goran Devic" (rect 56 2 135 17)(font "Arial" (font_size 9)))(border))
(section (rect 104 0 256 17)(text "MODULE" (rect 2 1 48 13)(font "Arial" ))(text "decode_state" (rect 43 2 135 17)(font "Arial" (font_size 9)(bold)))(border))
(section (rect 0 0 256 17)(text "PROJECT" (rect 2 0 52 12)(font "Arial" ))(text "A-Z80" (rect 56 2 94 17)(font "Arial" (font_size 9)(bold)))(border))
(section (rect 192 35 256 51)(text "REV" (rect 2 1 25 13)(font "Arial" ))(text "1.3" (rect 43 3 60 17)(font "Arial" (font_size 8)))(border))
(section (rect 0 35 256 51)(text "DATE" (rect 2 0 30 12)(font "Arial" ))(text "August 9, 2014, 2016" (rect 56 3 178 17)(font "Arial" (font_size 8)))(border))
(section (rect 192 35 256 51)(text "REV" (rect 2 1 25 13)(font "Arial" ))(text "1.4" (rect 43 3 60 17)(font "Arial" (font_size 8)))(border))
(drawing
)
)
/decode_state.bsf
75,53 → 75,60
(port
(pt 0 144)
(input)
(text "ctl_state_tbl_clr" (rect 0 0 89 14)(font "Arial" (font_size 8)))
(text "ctl_state_tbl_clr" (rect 21 139 110 153)(font "Arial" (font_size 8)))
(text "ctl_state_tbl_we" (rect 0 0 94 14)(font "Arial" (font_size 8)))
(text "ctl_state_tbl_we" (rect 21 139 115 153)(font "Arial" (font_size 8)))
(line (pt 0 144)(pt 16 144))
)
(port
(pt 0 160)
(input)
(text "ctl_state_tbl_ed_set" (rect 0 0 114 14)(font "Arial" (font_size 8)))
(text "ctl_state_tbl_ed_set" (rect 21 155 135 169)(font "Arial" (font_size 8)))
(text "hold_clk_wait" (rect 0 0 77 14)(font "Arial" (font_size 8)))
(text "hold_clk_wait" (rect 21 155 98 169)(font "Arial" (font_size 8)))
(line (pt 0 160)(pt 16 160))
)
(port
(pt 0 176)
(input)
(text "address_is_1" (rect 0 0 77 14)(font "Arial" (font_size 8)))
(text "address_is_1" (rect 21 171 98 185)(font "Arial" (font_size 8)))
(text "ctl_state_tbl_ed_set" (rect 0 0 114 14)(font "Arial" (font_size 8)))
(text "ctl_state_tbl_ed_set" (rect 21 171 135 185)(font "Arial" (font_size 8)))
(line (pt 0 176)(pt 16 176))
)
(port
(pt 0 192)
(input)
(text "clk" (rect 0 0 15 14)(font "Arial" (font_size 8)))
(text "clk" (rect 21 187 36 201)(font "Arial" (font_size 8)))
(text "address_is_1" (rect 0 0 77 14)(font "Arial" (font_size 8)))
(text "address_is_1" (rect 21 187 98 201)(font "Arial" (font_size 8)))
(line (pt 0 192)(pt 16 192))
)
(port
(pt 0 208)
(input)
(text "ctl_repeat_we" (rect 0 0 82 14)(font "Arial" (font_size 8)))
(text "ctl_repeat_we" (rect 21 203 103 217)(font "Arial" (font_size 8)))
(text "clk" (rect 0 0 15 14)(font "Arial" (font_size 8)))
(text "clk" (rect 21 203 36 217)(font "Arial" (font_size 8)))
(line (pt 0 208)(pt 16 208))
)
(port
(pt 0 224)
(input)
(text "nreset" (rect 0 0 36 14)(font "Arial" (font_size 8)))
(text "nreset" (rect 21 219 57 233)(font "Arial" (font_size 8)))
(text "ctl_repeat_we" (rect 0 0 82 14)(font "Arial" (font_size 8)))
(text "ctl_repeat_we" (rect 21 219 103 233)(font "Arial" (font_size 8)))
(line (pt 0 224)(pt 16 224))
)
(port
(pt 0 240)
(input)
(text "ctl_state_alu" (rect 0 0 71 14)(font "Arial" (font_size 8)))
(text "ctl_state_alu" (rect 21 235 92 249)(font "Arial" (font_size 8)))
(text "nreset" (rect 0 0 36 14)(font "Arial" (font_size 8)))
(text "nreset" (rect 21 235 57 249)(font "Arial" (font_size 8)))
(line (pt 0 240)(pt 16 240))
)
(port
(pt 0 256)
(input)
(text "ctl_state_alu" (rect 0 0 71 14)(font "Arial" (font_size 8)))
(text "ctl_state_alu" (rect 21 251 92 265)(font "Arial" (font_size 8)))
(line (pt 0 256)(pt 16 256))
)
(port
(pt 224 32)
(output)
(text "use_ix" (rect 0 0 37 14)(font "Arial" (font_size 8)))
/decode_state.v
14,7 → 14,7
 
// PROGRAM "Quartus II 64-Bit"
// VERSION "Version 13.0.1 Build 232 06/12/2013 Service Pack 1 SJ Web Edition"
// CREATED "Fri Oct 31 20:27:41 2014"
// CREATED "Wed Dec 07 00:18:12 2016"
 
module decode_state(
ctl_state_iy_set,
21,7 → 21,6
ctl_state_ixiy_clr,
ctl_state_ixiy_we,
ctl_state_halt_set,
ctl_state_tbl_clr,
ctl_state_tbl_ed_set,
ctl_state_tbl_cb_set,
ctl_state_alu,
31,6 → 30,8
in_intr,
in_nmi,
nreset,
ctl_state_tbl_we,
hold_clk_wait,
in_halt,
table_cb,
table_ed,
46,7 → 47,6
input wire ctl_state_ixiy_clr;
input wire ctl_state_ixiy_we;
input wire ctl_state_halt_set;
input wire ctl_state_tbl_clr;
input wire ctl_state_tbl_ed_set;
input wire ctl_state_tbl_cb_set;
input wire ctl_state_alu;
56,6 → 56,8
input wire in_intr;
input wire in_nmi;
input wire nreset;
input wire ctl_state_tbl_we;
input wire hold_clk_wait;
output reg in_halt;
output wire table_cb;
output wire table_ed;
71,8 → 73,9
reg DFFE_instED;
reg DFFE_instCB;
wire SYNTHESIZED_WIRE_0;
wire SYNTHESIZED_WIRE_1;
wire SYNTHESIZED_WIRE_5;
wire SYNTHESIZED_WIRE_4;
wire SYNTHESIZED_WIRE_3;
 
assign in_alu = ctl_state_alu;
assign table_cb = DFFE_instCB;
83,8 → 86,6
 
assign repeat_en = ~DFFE_instNonRep;
 
assign SYNTHESIZED_WIRE_4 = ctl_state_tbl_clr | ctl_state_tbl_ed_set | ctl_state_tbl_cb_set;
 
assign use_ixiy = DFFE_instIY1 | DFFE_inst4;
 
assign table_xx = ~(DFFE_instED | DFFE_instCB);
105,9 → 106,13
 
assign SYNTHESIZED_WIRE_0 = ~(ctl_state_iy_set | ctl_state_ixiy_clr);
 
assign SYNTHESIZED_WIRE_3 = in_nmi | in_intr;
assign SYNTHESIZED_WIRE_5 = ctl_state_tbl_we & SYNTHESIZED_WIRE_1;
 
assign SYNTHESIZED_WIRE_4 = in_nmi | in_intr;
 
assign SYNTHESIZED_WIRE_1 = ~hold_clk_wait;
 
 
always@(posedge clk or negedge nreset)
begin
if (!nreset)
115,7 → 120,7
DFFE_instCB <= 0;
end
else
if (SYNTHESIZED_WIRE_4)
if (SYNTHESIZED_WIRE_5)
begin
DFFE_instCB <= ctl_state_tbl_cb_set;
end
129,7 → 134,7
DFFE_instED <= 0;
end
else
if (SYNTHESIZED_WIRE_4)
if (SYNTHESIZED_WIRE_5)
begin
DFFE_instED <= ctl_state_tbl_ed_set;
end
144,7 → 149,7
end
else
begin
in_halt <= ~in_halt & ctl_state_halt_set | in_halt & ~SYNTHESIZED_WIRE_3;
in_halt <= ~in_halt & ctl_state_halt_set | in_halt & ~SYNTHESIZED_WIRE_4;
end
end
 
/exec_matrix.vh
3646,7 → 3646,7
ctl_flags_pf_we=1;
ctl_flags_nf_we=1; /* Previous NF, to be used when loading FLAGT */
ctl_flags_cf_we=1;
ctl_state_tbl_cb_set=1; setCBED=1; /* CB-table prefix */ end
ctl_state_tbl_we=1; ctl_state_tbl_cb_set=1; /* CB-table prefix */ end
if (M1 & T4) begin validPLA=1; nextM=1; ctl_mRead=1; end
if (M2 & T1) begin fMRead=1;
ctl_reg_sel_pc=1; ctl_reg_sys_hilo=2'b11; /* Select 16-bit PC */
3685,7 → 3685,7
 
if (pla[44]) begin
if (M1 & T2) begin
ctl_state_tbl_cb_set=1; setCBED=1; /* CB-table prefix */ end
ctl_state_tbl_we=1; ctl_state_tbl_cb_set=1; /* CB-table prefix */ end
if (M1 & T4) begin validPLA=1; setM1=1;
ctl_no_ints=1; /* Disable interrupt generation for this opcode (DI/EI/CB/ED/DD/FD) */ end
end
3692,7 → 3692,7
 
if (pla[51]) begin
if (M1 & T2) begin
ctl_state_tbl_ed_set=1; setCBED=1; /* ED-table prefix */ end
ctl_state_tbl_we=1; ctl_state_tbl_ed_set=1; /* ED-table prefix */ end
if (M1 & T4) begin validPLA=1; setM1=1;
ctl_no_ints=1; /* Disable interrupt generation for this opcode (DI/EI/CB/ED/DD/FD) */ end
end
3842,7 → 3842,7
ctl_alu_core_hf|=~ctl_alu_op_low;
ctl_flags_xy_we=1;
ctl_alu_sel_op2_neg=flags_sf;
ctl_state_ixiy_we=1; ctl_state_ixiy_clr=~setIXIY; /* Clear IX/IY flag */ end
ctl_state_ixiy_we=1; ctl_state_ixiy_clr=~setIXIY; /* Clear IX/IY flag if not explicitly set */ end
end
 
// Default instruction fetch (M1) state machine
3855,8 → 3855,8
ctl_reg_sel_ir=1; ctl_reg_sys_hilo=2'b11; /* Select 16-bit IR */
ctl_al_we=1; /* Write a value from the register bus to the address latch */
ctl_bus_db_oe=1; /* Read DB pads to internal data bus */
ctl_state_ixiy_we=1; ctl_state_ixiy_clr=~setIXIY; /* Clear IX/IY flag */
ctl_state_tbl_clr=~setCBED; /* Clear CB/ED prefix */
ctl_state_ixiy_we=1; ctl_state_ixiy_clr=~setIXIY; /* Clear IX/IY flag if not explicitly set */
ctl_state_tbl_we=1; /* Clear CB/ED prefix if not explicitly set */
ctl_ir_we=1;
ctl_bus_zero_oe=in_halt; ctl_bus_ff_oe=(in_intr & (im1 | im2)) | in_nmi; end
if (M1 & T3) begin
/exec_matrix_compiled.vh
5522,8 → 5522,8
ctl_flags_pf_we = ctl_flags_pf_we | (pla[49])&(M1&T3);
ctl_flags_nf_we = ctl_flags_nf_we | (pla[49])&(M1&T3);
ctl_flags_cf_we = ctl_flags_cf_we | (pla[49])&(M1&T3);
ctl_state_tbl_we = ctl_state_tbl_we | (pla[49])&(M1&T3);
ctl_state_tbl_cb_set = ctl_state_tbl_cb_set | (pla[49])&(M1&T3);
setCBED = setCBED | (pla[49])&(M1&T3);
validPLA = validPLA | (pla[49])&(M1&T4);
nextM = nextM | (pla[49])&(M1&T4);
ctl_mRead = ctl_mRead | (pla[49])&(M1&T4);
5575,13 → 5575,13
validPLA = validPLA | (pla[3])&(M1&T4);
setM1 = setM1 | (pla[3])&(M1&T4);
ctl_no_ints = ctl_no_ints | (pla[3])&(M1&T4);
ctl_state_tbl_we = ctl_state_tbl_we | (pla[44])&(M1&T2);
ctl_state_tbl_cb_set = ctl_state_tbl_cb_set | (pla[44])&(M1&T2);
setCBED = setCBED | (pla[44])&(M1&T2);
validPLA = validPLA | (pla[44])&(M1&T4);
setM1 = setM1 | (pla[44])&(M1&T4);
ctl_no_ints = ctl_no_ints | (pla[44])&(M1&T4);
ctl_state_tbl_we = ctl_state_tbl_we | (pla[51])&(M1&T2);
ctl_state_tbl_ed_set = ctl_state_tbl_ed_set | (pla[51])&(M1&T2);
setCBED = setCBED | (pla[51])&(M1&T2);
validPLA = validPLA | (pla[51])&(M1&T4);
setM1 = setM1 | (pla[51])&(M1&T4);
ctl_no_ints = ctl_no_ints | (pla[51])&(M1&T4);
5792,7 → 5792,7
ctl_bus_db_oe = ctl_bus_db_oe | (M1&T2);
ctl_state_ixiy_we = ctl_state_ixiy_we | (M1&T2);
ctl_state_ixiy_clr = ctl_state_ixiy_clr | (M1&T2)&(~setIXIY);
ctl_state_tbl_clr = ctl_state_tbl_clr | (M1&T2)&(~setCBED);
ctl_state_tbl_we = ctl_state_tbl_we | (M1&T2);
ctl_ir_we = ctl_ir_we | (M1&T2);
ctl_bus_zero_oe = ctl_bus_zero_oe | (M1&T2)&(in_halt);
ctl_bus_ff_oe = ctl_bus_ff_oe | (M1&T2)&((in_intr&(im1|im2))|in_nmi);
/exec_module.vh
5,11 → 5,11
output reg ctl_state_ixiy_clr,
output reg ctl_state_ixiy_we,
output reg ctl_state_halt_set,
output reg ctl_state_tbl_clr,
output reg ctl_state_tbl_ed_set,
output reg ctl_state_tbl_cb_set,
output reg ctl_state_alu,
output reg ctl_repeat_we,
output reg ctl_state_tbl_we,
 
// Module: control/interrupts.v
output reg ctl_iff1_iff2,
/exec_zero.vh
5,11 → 5,11
ctl_state_ixiy_clr = 0;
ctl_state_ixiy_we = 0;
ctl_state_halt_set = 0;
ctl_state_tbl_clr = 0;
ctl_state_tbl_ed_set = 0;
ctl_state_tbl_cb_set = 0;
ctl_state_alu = 0;
ctl_repeat_we = 0;
ctl_state_tbl_we = 0;
 
// Module: control/interrupts.v
ctl_iff1_iff2 = 0;
/execute.bsf
18,936 → 18,929
Altera or its authorized distributors. Please refer to the
applicable agreement for further details.
*/
(header "symbol" (version "1.2"))
(header "symbol" (version "1.1"))
(symbol
(rect 64 64 320 1840)
(text "execute" (rect 5 0 43 12)(font "Arial" ))
(text "inst" (rect 8 1760 25 1772)(font "Arial" ))
(rect 16 16 272 1792)
(text "execute" (rect 5 0 35 12)(font "Arial" ))
(text "inst" (rect 8 1760 20 1772)(font "Arial" ))
(port
(pt 0 32)
(input)
(text "pla[104..0]" (rect 0 0 51 12)(font "Arial" ))
(text "pla[104..0]" (rect 21 27 72 39)(font "Arial" ))
(text "pla[104..0]" (rect 0 0 40 12)(font "Arial" ))
(text "pla[104..0]" (rect 21 27 61 39)(font "Arial" ))
(line (pt 0 32)(pt 16 32)(line_width 3))
)
(port
(pt 0 48)
(input)
(text "nreset" (rect 0 0 30 12)(font "Arial" ))
(text "nreset" (rect 21 43 51 55)(font "Arial" ))
(line (pt 0 48)(pt 16 48))
(text "in_intr" (rect 0 0 23 12)(font "Arial" ))
(text "in_intr" (rect 21 43 44 55)(font "Arial" ))
(line (pt 0 48)(pt 16 48)(line_width 1))
)
(port
(pt 0 64)
(input)
(text "in_intr" (rect 0 0 29 12)(font "Arial" ))
(text "in_intr" (rect 21 59 50 71)(font "Arial" ))
(line (pt 0 64)(pt 16 64))
(text "in_nmi" (rect 0 0 25 12)(font "Arial" ))
(text "in_nmi" (rect 21 59 46 71)(font "Arial" ))
(line (pt 0 64)(pt 16 64)(line_width 1))
)
(port
(pt 0 80)
(input)
(text "in_nmi" (rect 0 0 31 12)(font "Arial" ))
(text "in_nmi" (rect 21 75 52 87)(font "Arial" ))
(line (pt 0 80)(pt 16 80))
(text "in_halt" (rect 0 0 24 12)(font "Arial" ))
(text "in_halt" (rect 21 75 45 87)(font "Arial" ))
(line (pt 0 80)(pt 16 80)(line_width 1))
)
(port
(pt 0 96)
(input)
(text "in_halt" (rect 0 0 31 12)(font "Arial" ))
(text "in_halt" (rect 21 91 52 103)(font "Arial" ))
(line (pt 0 96)(pt 16 96))
(text "im1" (rect 0 0 12 12)(font "Arial" ))
(text "im1" (rect 21 91 33 103)(font "Arial" ))
(line (pt 0 96)(pt 16 96)(line_width 1))
)
(port
(pt 0 112)
(input)
(text "im1" (rect 0 0 17 12)(font "Arial" ))
(text "im1" (rect 21 107 38 119)(font "Arial" ))
(line (pt 0 112)(pt 16 112))
(text "im2" (rect 0 0 14 12)(font "Arial" ))
(text "im2" (rect 21 107 35 119)(font "Arial" ))
(line (pt 0 112)(pt 16 112)(line_width 1))
)
(port
(pt 0 128)
(input)
(text "im2" (rect 0 0 17 12)(font "Arial" ))
(text "im2" (rect 21 123 38 135)(font "Arial" ))
(line (pt 0 128)(pt 16 128))
(text "use_ixiy" (rect 0 0 33 12)(font "Arial" ))
(text "use_ixiy" (rect 21 123 54 135)(font "Arial" ))
(line (pt 0 128)(pt 16 128)(line_width 1))
)
(port
(pt 0 144)
(input)
(text "use_ixiy" (rect 0 0 41 12)(font "Arial" ))
(text "use_ixiy" (rect 21 139 62 151)(font "Arial" ))
(line (pt 0 144)(pt 16 144))
(text "flags_cond_true" (rect 0 0 64 12)(font "Arial" ))
(text "flags_cond_true" (rect 21 139 85 151)(font "Arial" ))
(line (pt 0 144)(pt 16 144)(line_width 1))
)
(port
(pt 0 160)
(input)
(text "flags_cond_true" (rect 0 0 79 12)(font "Arial" ))
(text "flags_cond_true" (rect 21 155 100 167)(font "Arial" ))
(line (pt 0 160)(pt 16 160))
(text "repeat_en" (rect 0 0 40 12)(font "Arial" ))
(text "repeat_en" (rect 21 155 61 167)(font "Arial" ))
(line (pt 0 160)(pt 16 160)(line_width 1))
)
(port
(pt 0 176)
(input)
(text "repeat_en" (rect 0 0 48 12)(font "Arial" ))
(text "repeat_en" (rect 21 171 69 183)(font "Arial" ))
(line (pt 0 176)(pt 16 176))
(text "flags_zf" (rect 0 0 31 12)(font "Arial" ))
(text "flags_zf" (rect 21 171 52 183)(font "Arial" ))
(line (pt 0 176)(pt 16 176)(line_width 1))
)
(port
(pt 0 192)
(input)
(text "flags_zf" (rect 0 0 40 12)(font "Arial" ))
(text "flags_zf" (rect 21 187 61 199)(font "Arial" ))
(line (pt 0 192)(pt 16 192))
(text "flags_nf" (rect 0 0 33 12)(font "Arial" ))
(text "flags_nf" (rect 21 187 54 199)(font "Arial" ))
(line (pt 0 192)(pt 16 192)(line_width 1))
)
(port
(pt 0 208)
(input)
(text "flags_nf" (rect 0 0 41 12)(font "Arial" ))
(text "flags_nf" (rect 21 203 62 215)(font "Arial" ))
(line (pt 0 208)(pt 16 208))
(text "flags_sf" (rect 0 0 33 12)(font "Arial" ))
(text "flags_sf" (rect 21 203 54 215)(font "Arial" ))
(line (pt 0 208)(pt 16 208)(line_width 1))
)
(port
(pt 0 224)
(input)
(text "flags_sf" (rect 0 0 41 12)(font "Arial" ))
(text "flags_sf" (rect 21 219 62 231)(font "Arial" ))
(line (pt 0 224)(pt 16 224))
(text "flags_cf" (rect 0 0 33 12)(font "Arial" ))
(text "flags_cf" (rect 21 219 54 231)(font "Arial" ))
(line (pt 0 224)(pt 16 224)(line_width 1))
)
(port
(pt 0 240)
(input)
(text "flags_cf" (rect 0 0 41 12)(font "Arial" ))
(text "flags_cf" (rect 21 235 62 247)(font "Arial" ))
(line (pt 0 240)(pt 16 240))
(text "M1" (rect 0 0 11 12)(font "Arial" ))
(text "M1" (rect 21 235 32 247)(font "Arial" ))
(line (pt 0 240)(pt 16 240)(line_width 1))
)
(port
(pt 0 256)
(input)
(text "M1" (rect 0 0 14 12)(font "Arial" ))
(text "M1" (rect 21 251 35 263)(font "Arial" ))
(line (pt 0 256)(pt 16 256))
(text "M2" (rect 0 0 12 12)(font "Arial" ))
(text "M2" (rect 21 251 33 263)(font "Arial" ))
(line (pt 0 256)(pt 16 256)(line_width 1))
)
(port
(pt 0 272)
(input)
(text "M2" (rect 0 0 14 12)(font "Arial" ))
(text "M2" (rect 21 267 35 279)(font "Arial" ))
(line (pt 0 272)(pt 16 272))
(text "M3" (rect 0 0 12 12)(font "Arial" ))
(text "M3" (rect 21 267 33 279)(font "Arial" ))
(line (pt 0 272)(pt 16 272)(line_width 1))
)
(port
(pt 0 288)
(input)
(text "M3" (rect 0 0 14 12)(font "Arial" ))
(text "M3" (rect 21 283 35 295)(font "Arial" ))
(line (pt 0 288)(pt 16 288))
(text "M4" (rect 0 0 14 12)(font "Arial" ))
(text "M4" (rect 21 283 35 295)(font "Arial" ))
(line (pt 0 288)(pt 16 288)(line_width 1))
)
(port
(pt 0 304)
(input)
(text "M4" (rect 0 0 14 12)(font "Arial" ))
(text "M4" (rect 21 299 35 311)(font "Arial" ))
(line (pt 0 304)(pt 16 304))
(text "M5" (rect 0 0 12 12)(font "Arial" ))
(text "M5" (rect 21 299 33 311)(font "Arial" ))
(line (pt 0 304)(pt 16 304)(line_width 1))
)
(port
(pt 0 320)
(input)
(text "M5" (rect 0 0 14 12)(font "Arial" ))
(text "M5" (rect 21 315 35 327)(font "Arial" ))
(line (pt 0 320)(pt 16 320))
(text "T1" (rect 0 0 9 12)(font "Arial" ))
(text "T1" (rect 21 315 30 327)(font "Arial" ))
(line (pt 0 320)(pt 16 320)(line_width 1))
)
(port
(pt 0 336)
(input)
(text "T2" (rect 0 0 10 12)(font "Arial" ))
(text "T2" (rect 21 331 31 343)(font "Arial" ))
(line (pt 0 336)(pt 16 336)(line_width 1))
)
(port
(pt 0 352)
(input)
(text "T1" (rect 0 0 11 12)(font "Arial" ))
(text "T1" (rect 21 347 32 359)(font "Arial" ))
(line (pt 0 352)(pt 16 352))
(text "T3" (rect 0 0 10 12)(font "Arial" ))
(text "T3" (rect 21 347 31 359)(font "Arial" ))
(line (pt 0 352)(pt 16 352)(line_width 1))
)
(port
(pt 0 368)
(input)
(text "T2" (rect 0 0 11 12)(font "Arial" ))
(text "T2" (rect 21 363 32 375)(font "Arial" ))
(line (pt 0 368)(pt 16 368))
(text "T4" (rect 0 0 11 12)(font "Arial" ))
(text "T4" (rect 21 363 32 375)(font "Arial" ))
(line (pt 0 368)(pt 16 368)(line_width 1))
)
(port
(pt 0 384)
(input)
(text "T3" (rect 0 0 11 12)(font "Arial" ))
(text "T3" (rect 21 379 32 391)(font "Arial" ))
(line (pt 0 384)(pt 16 384))
(text "T5" (rect 0 0 10 12)(font "Arial" ))
(text "T5" (rect 21 379 31 391)(font "Arial" ))
(line (pt 0 384)(pt 16 384)(line_width 1))
)
(port
(pt 0 400)
(input)
(text "T4" (rect 0 0 11 12)(font "Arial" ))
(text "T4" (rect 21 395 32 407)(font "Arial" ))
(line (pt 0 400)(pt 16 400))
(text "T6" (rect 0 0 10 12)(font "Arial" ))
(text "T6" (rect 21 395 31 407)(font "Arial" ))
(line (pt 0 400)(pt 16 400)(line_width 1))
)
(port
(pt 0 416)
(input)
(text "T5" (rect 0 0 11 12)(font "Arial" ))
(text "T5" (rect 21 411 32 423)(font "Arial" ))
(line (pt 0 416)(pt 16 416))
)
(port
(pt 0 432)
(input)
(text "T6" (rect 0 0 11 12)(font "Arial" ))
(text "T6" (rect 21 427 32 439)(font "Arial" ))
(line (pt 0 432)(pt 16 432))
)
(port
(pt 256 32)
(output)
(text "ctl_state_iy_set" (rect 0 0 79 12)(font "Arial" ))
(text "ctl_state_iy_set" (rect 169 27 235 39)(font "Arial" ))
(line (pt 256 32)(pt 240 32))
(text "ctl_state_iy_set" (rect 0 0 63 12)(font "Arial" ))
(text "ctl_state_iy_set" (rect 172 27 235 39)(font "Arial" ))
(line (pt 256 32)(pt 240 32)(line_width 1))
)
(port
(pt 256 48)
(output)
(text "ctl_state_ixiy_clr" (rect 0 0 83 12)(font "Arial" ))
(text "ctl_state_ixiy_clr" (rect 165 43 235 55)(font "Arial" ))
(line (pt 256 48)(pt 240 48))
(text "ctl_state_ixiy_clr" (rect 0 0 67 12)(font "Arial" ))
(text "ctl_state_ixiy_clr" (rect 168 43 235 55)(font "Arial" ))
(line (pt 256 48)(pt 240 48)(line_width 1))
)
(port
(pt 256 64)
(output)
(text "ctl_state_ixiy_we" (rect 0 0 84 12)(font "Arial" ))
(text "ctl_state_ixiy_we" (rect 164 59 235 71)(font "Arial" ))
(line (pt 256 64)(pt 240 64))
(text "ctl_state_ixiy_we" (rect 0 0 68 12)(font "Arial" ))
(text "ctl_state_ixiy_we" (rect 167 59 235 71)(font "Arial" ))
(line (pt 256 64)(pt 240 64)(line_width 1))
)
(port
(pt 256 80)
(output)
(text "ctl_state_halt_set" (rect 0 0 87 12)(font "Arial" ))
(text "ctl_state_halt_set" (rect 162 75 235 87)(font "Arial" ))
(line (pt 256 80)(pt 240 80))
(text "ctl_state_halt_set" (rect 0 0 69 12)(font "Arial" ))
(text "ctl_state_halt_set" (rect 166 75 235 87)(font "Arial" ))
(line (pt 256 80)(pt 240 80)(line_width 1))
)
(port
(pt 256 96)
(output)
(text "ctl_state_tbl_clr" (rect 0 0 77 12)(font "Arial" ))
(text "ctl_state_tbl_clr" (rect 170 91 235 103)(font "Arial" ))
(line (pt 256 96)(pt 240 96))
(text "ctl_state_tbl_ed_set" (rect 0 0 80 12)(font "Arial" ))
(text "ctl_state_tbl_ed_set" (rect 155 91 235 103)(font "Arial" ))
(line (pt 256 96)(pt 240 96)(line_width 1))
)
(port
(pt 256 112)
(output)
(text "ctl_state_tbl_ed_set" (rect 0 0 99 12)(font "Arial" ))
(text "ctl_state_tbl_ed_set" (rect 152 107 235 119)(font "Arial" ))
(line (pt 256 112)(pt 240 112))
(text "ctl_state_tbl_cb_set" (rect 0 0 80 12)(font "Arial" ))
(text "ctl_state_tbl_cb_set" (rect 155 107 235 119)(font "Arial" ))
(line (pt 256 112)(pt 240 112)(line_width 1))
)
(port
(pt 256 128)
(output)
(text "ctl_state_tbl_cb_set" (rect 0 0 99 12)(font "Arial" ))
(text "ctl_state_tbl_cb_set" (rect 152 123 235 135)(font "Arial" ))
(line (pt 256 128)(pt 240 128))
(text "ctl_state_alu" (rect 0 0 49 12)(font "Arial" ))
(text "ctl_state_alu" (rect 186 123 235 135)(font "Arial" ))
(line (pt 256 128)(pt 240 128)(line_width 1))
)
(port
(pt 256 144)
(output)
(text "ctl_state_alu" (rect 0 0 62 12)(font "Arial" ))
(text "ctl_state_alu" (rect 183 139 235 151)(font "Arial" ))
(line (pt 256 144)(pt 240 144))
(text "ctl_repeat_we" (rect 0 0 55 12)(font "Arial" ))
(text "ctl_repeat_we" (rect 180 139 235 151)(font "Arial" ))
(line (pt 256 144)(pt 240 144)(line_width 1))
)
(port
(pt 256 160)
(output)
(text "ctl_repeat_we" (rect 0 0 67 12)(font "Arial" ))
(text "ctl_repeat_we" (rect 179 155 235 167)(font "Arial" ))
(line (pt 256 160)(pt 240 160))
(text "ctl_state_tbl_we" (rect 0 0 63 12)(font "Arial" ))
(text "ctl_state_tbl_we" (rect 172 155 235 167)(font "Arial" ))
(line (pt 256 160)(pt 240 160)(line_width 1))
)
(port
(pt 256 176)
(output)
(text "ctl_iff1_iff2" (rect 0 0 59 12)(font "Arial" ))
(text "ctl_iff1_iff2" (rect 186 171 235 183)(font "Arial" ))
(line (pt 256 176)(pt 240 176))
(text "ctl_iff1_iff2" (rect 0 0 44 12)(font "Arial" ))
(text "ctl_iff1_iff2" (rect 191 171 235 183)(font "Arial" ))
(line (pt 256 176)(pt 240 176)(line_width 1))
)
(port
(pt 256 192)
(output)
(text "ctl_iffx_we" (rect 0 0 54 12)(font "Arial" ))
(text "ctl_iffx_we" (rect 190 187 235 199)(font "Arial" ))
(line (pt 256 192)(pt 240 192))
(text "ctl_iffx_we" (rect 0 0 43 12)(font "Arial" ))
(text "ctl_iffx_we" (rect 192 187 235 199)(font "Arial" ))
(line (pt 256 192)(pt 240 192)(line_width 1))
)
(port
(pt 256 208)
(output)
(text "ctl_iffx_bit" (rect 0 0 53 12)(font "Arial" ))
(text "ctl_iffx_bit" (rect 191 203 235 215)(font "Arial" ))
(line (pt 256 208)(pt 240 208))
(text "ctl_iffx_bit" (rect 0 0 41 12)(font "Arial" ))
(text "ctl_iffx_bit" (rect 194 203 235 215)(font "Arial" ))
(line (pt 256 208)(pt 240 208)(line_width 1))
)
(port
(pt 256 224)
(output)
(text "ctl_im_we" (rect 0 0 48 12)(font "Arial" ))
(text "ctl_im_we" (rect 0 0 40 12)(font "Arial" ))
(text "ctl_im_we" (rect 195 219 235 231)(font "Arial" ))
(line (pt 256 224)(pt 240 224))
(line (pt 256 224)(pt 240 224)(line_width 1))
)
(port
(pt 256 240)
(output)
(text "ctl_no_ints" (rect 0 0 53 12)(font "Arial" ))
(text "ctl_no_ints" (rect 191 235 235 247)(font "Arial" ))
(line (pt 256 240)(pt 240 240))
(text "ctl_no_ints" (rect 0 0 42 12)(font "Arial" ))
(text "ctl_no_ints" (rect 193 235 235 247)(font "Arial" ))
(line (pt 256 240)(pt 240 240)(line_width 1))
)
(port
(pt 256 256)
(output)
(text "ctl_ir_we" (rect 0 0 42 12)(font "Arial" ))
(text "ctl_ir_we" (rect 0 0 35 12)(font "Arial" ))
(text "ctl_ir_we" (rect 200 251 235 263)(font "Arial" ))
(line (pt 256 256)(pt 240 256))
(line (pt 256 256)(pt 240 256)(line_width 1))
)
(port
(pt 256 272)
(output)
(text "ctl_mRead" (rect 0 0 53 12)(font "Arial" ))
(text "ctl_mRead" (rect 0 0 44 12)(font "Arial" ))
(text "ctl_mRead" (rect 191 267 235 279)(font "Arial" ))
(line (pt 256 272)(pt 240 272))
(line (pt 256 272)(pt 240 272)(line_width 1))
)
(port
(pt 256 288)
(output)
(text "ctl_mWrite" (rect 0 0 53 12)(font "Arial" ))
(text "ctl_mWrite" (rect 0 0 44 12)(font "Arial" ))
(text "ctl_mWrite" (rect 191 283 235 295)(font "Arial" ))
(line (pt 256 288)(pt 240 288))
(line (pt 256 288)(pt 240 288)(line_width 1))
)
(port
(pt 256 304)
(output)
(text "ctl_iorw" (rect 0 0 36 12)(font "Arial" ))
(text "ctl_iorw" (rect 205 299 235 311)(font "Arial" ))
(line (pt 256 304)(pt 240 304))
(text "ctl_iorw" (rect 0 0 29 12)(font "Arial" ))
(text "ctl_iorw" (rect 206 299 235 311)(font "Arial" ))
(line (pt 256 304)(pt 240 304)(line_width 1))
)
(port
(pt 256 320)
(output)
(text "ctl_shift_en" (rect 0 0 57 12)(font "Arial" ))
(text "ctl_shift_en" (rect 187 315 235 327)(font "Arial" ))
(line (pt 256 320)(pt 240 320))
(text "ctl_shift_en" (rect 0 0 46 12)(font "Arial" ))
(text "ctl_shift_en" (rect 189 315 235 327)(font "Arial" ))
(line (pt 256 320)(pt 240 320)(line_width 1))
)
(port
(pt 256 336)
(output)
(text "ctl_daa_oe" (rect 0 0 53 12)(font "Arial" ))
(text "ctl_daa_oe" (rect 191 331 235 343)(font "Arial" ))
(line (pt 256 336)(pt 240 336))
(text "ctl_daa_oe" (rect 0 0 43 12)(font "Arial" ))
(text "ctl_daa_oe" (rect 192 331 235 343)(font "Arial" ))
(line (pt 256 336)(pt 240 336)(line_width 1))
)
(port
(pt 256 352)
(output)
(text "ctl_alu_op_low" (rect 0 0 70 12)(font "Arial" ))
(text "ctl_alu_op_low" (rect 176 347 235 359)(font "Arial" ))
(line (pt 256 352)(pt 240 352))
(text "ctl_alu_op_low" (rect 0 0 57 12)(font "Arial" ))
(text "ctl_alu_op_low" (rect 178 347 235 359)(font "Arial" ))
(line (pt 256 352)(pt 240 352)(line_width 1))
)
(port
(pt 256 368)
(output)
(text "ctl_cond_short" (rect 0 0 71 12)(font "Arial" ))
(text "ctl_cond_short" (rect 175 363 235 375)(font "Arial" ))
(line (pt 256 368)(pt 240 368))
(text "ctl_cond_short" (rect 0 0 59 12)(font "Arial" ))
(text "ctl_cond_short" (rect 176 363 235 375)(font "Arial" ))
(line (pt 256 368)(pt 240 368)(line_width 1))
)
(port
(pt 256 384)
(output)
(text "ctl_alu_core_hf" (rect 0 0 75 12)(font "Arial" ))
(text "ctl_alu_core_hf" (rect 172 379 235 391)(font "Arial" ))
(line (pt 256 384)(pt 240 384))
(text "ctl_alu_core_hf" (rect 0 0 62 12)(font "Arial" ))
(text "ctl_alu_core_hf" (rect 173 379 235 391)(font "Arial" ))
(line (pt 256 384)(pt 240 384)(line_width 1))
)
(port
(pt 256 400)
(output)
(text "ctl_eval_cond" (rect 0 0 68 12)(font "Arial" ))
(text "ctl_eval_cond" (rect 178 395 235 407)(font "Arial" ))
(line (pt 256 400)(pt 240 400))
(text "ctl_eval_cond" (rect 0 0 55 12)(font "Arial" ))
(text "ctl_eval_cond" (rect 180 395 235 407)(font "Arial" ))
(line (pt 256 400)(pt 240 400)(line_width 1))
)
(port
(pt 256 416)
(output)
(text "ctl_66_oe" (rect 0 0 47 12)(font "Arial" ))
(text "ctl_66_oe" (rect 196 411 235 423)(font "Arial" ))
(line (pt 256 416)(pt 240 416))
(text "ctl_66_oe" (rect 0 0 38 12)(font "Arial" ))
(text "ctl_66_oe" (rect 197 411 235 423)(font "Arial" ))
(line (pt 256 416)(pt 240 416)(line_width 1))
)
(port
(pt 256 432)
(output)
(text "ctl_pf_sel[1..0]" (rect 0 0 74 12)(font "Arial" ))
(text "ctl_pf_sel[1..0]" (rect 173 427 235 439)(font "Arial" ))
(text "ctl_pf_sel[1..0]" (rect 0 0 57 12)(font "Arial" ))
(text "ctl_pf_sel[1..0]" (rect 178 427 235 439)(font "Arial" ))
(line (pt 256 432)(pt 240 432)(line_width 3))
)
(port
(pt 256 448)
(output)
(text "ctl_alu_oe" (rect 0 0 49 12)(font "Arial" ))
(text "ctl_alu_oe" (rect 194 443 235 455)(font "Arial" ))
(line (pt 256 448)(pt 240 448))
(text "ctl_alu_oe" (rect 0 0 40 12)(font "Arial" ))
(text "ctl_alu_oe" (rect 195 443 235 455)(font "Arial" ))
(line (pt 256 448)(pt 240 448)(line_width 1))
)
(port
(pt 256 464)
(output)
(text "ctl_alu_shift_oe" (rect 0 0 77 12)(font "Arial" ))
(text "ctl_alu_shift_oe" (rect 170 459 235 471)(font "Arial" ))
(line (pt 256 464)(pt 240 464))
(text "ctl_alu_shift_oe" (rect 0 0 62 12)(font "Arial" ))
(text "ctl_alu_shift_oe" (rect 173 459 235 471)(font "Arial" ))
(line (pt 256 464)(pt 240 464)(line_width 1))
)
(port
(pt 256 480)
(output)
(text "ctl_alu_op2_oe" (rect 0 0 73 12)(font "Arial" ))
(text "ctl_alu_op2_oe" (rect 174 475 235 487)(font "Arial" ))
(line (pt 256 480)(pt 240 480))
(text "ctl_alu_op2_oe" (rect 0 0 60 12)(font "Arial" ))
(text "ctl_alu_op2_oe" (rect 175 475 235 487)(font "Arial" ))
(line (pt 256 480)(pt 240 480)(line_width 1))
)
(port
(pt 256 496)
(output)
(text "ctl_alu_res_oe" (rect 0 0 70 12)(font "Arial" ))
(text "ctl_alu_res_oe" (rect 0 0 59 12)(font "Arial" ))
(text "ctl_alu_res_oe" (rect 176 491 235 503)(font "Arial" ))
(line (pt 256 496)(pt 240 496))
(line (pt 256 496)(pt 240 496)(line_width 1))
)
(port
(pt 256 512)
(output)
(text "ctl_alu_op1_oe" (rect 0 0 73 12)(font "Arial" ))
(text "ctl_alu_op1_oe" (rect 174 507 235 519)(font "Arial" ))
(line (pt 256 512)(pt 240 512))
(text "ctl_alu_op1_oe" (rect 0 0 59 12)(font "Arial" ))
(text "ctl_alu_op1_oe" (rect 176 507 235 519)(font "Arial" ))
(line (pt 256 512)(pt 240 512)(line_width 1))
)
(port
(pt 256 528)
(output)
(text "ctl_alu_bs_oe" (rect 0 0 67 12)(font "Arial" ))
(text "ctl_alu_bs_oe" (rect 179 523 235 535)(font "Arial" ))
(line (pt 256 528)(pt 240 528))
(text "ctl_alu_bs_oe" (rect 0 0 55 12)(font "Arial" ))
(text "ctl_alu_bs_oe" (rect 180 523 235 535)(font "Arial" ))
(line (pt 256 528)(pt 240 528)(line_width 1))
)
(port
(pt 256 544)
(output)
(text "ctl_alu_op1_sel_bus" (rect 0 0 99 12)(font "Arial" ))
(text "ctl_alu_op1_sel_bus" (rect 152 539 235 551)(font "Arial" ))
(line (pt 256 544)(pt 240 544))
(text "ctl_alu_op1_sel_bus" (rect 0 0 80 12)(font "Arial" ))
(text "ctl_alu_op1_sel_bus" (rect 155 539 235 551)(font "Arial" ))
(line (pt 256 544)(pt 240 544)(line_width 1))
)
(port
(pt 256 560)
(output)
(text "ctl_alu_op1_sel_low" (rect 0 0 96 12)(font "Arial" ))
(text "ctl_alu_op1_sel_low" (rect 154 555 235 567)(font "Arial" ))
(line (pt 256 560)(pt 240 560))
(text "ctl_alu_op1_sel_low" (rect 0 0 77 12)(font "Arial" ))
(text "ctl_alu_op1_sel_low" (rect 158 555 235 567)(font "Arial" ))
(line (pt 256 560)(pt 240 560)(line_width 1))
)
(port
(pt 256 576)
(output)
(text "ctl_alu_op1_sel_zero" (rect 0 0 101 12)(font "Arial" ))
(text "ctl_alu_op1_sel_zero" (rect 150 571 235 583)(font "Arial" ))
(line (pt 256 576)(pt 240 576))
(text "ctl_alu_op1_sel_zero" (rect 0 0 82 12)(font "Arial" ))
(text "ctl_alu_op1_sel_zero" (rect 153 571 235 583)(font "Arial" ))
(line (pt 256 576)(pt 240 576)(line_width 1))
)
(port
(pt 256 592)
(output)
(text "ctl_alu_op2_sel_zero" (rect 0 0 101 12)(font "Arial" ))
(text "ctl_alu_op2_sel_zero" (rect 150 587 235 599)(font "Arial" ))
(line (pt 256 592)(pt 240 592))
(text "ctl_alu_op2_sel_zero" (rect 0 0 83 12)(font "Arial" ))
(text "ctl_alu_op2_sel_zero" (rect 152 587 235 599)(font "Arial" ))
(line (pt 256 592)(pt 240 592)(line_width 1))
)
(port
(pt 256 608)
(output)
(text "ctl_alu_op2_sel_bus" (rect 0 0 99 12)(font "Arial" ))
(text "ctl_alu_op2_sel_bus" (rect 152 603 235 615)(font "Arial" ))
(line (pt 256 608)(pt 240 608))
(text "ctl_alu_op2_sel_bus" (rect 0 0 81 12)(font "Arial" ))
(text "ctl_alu_op2_sel_bus" (rect 154 603 235 615)(font "Arial" ))
(line (pt 256 608)(pt 240 608)(line_width 1))
)
(port
(pt 256 624)
(output)
(text "ctl_alu_op2_sel_lq" (rect 0 0 89 12)(font "Arial" ))
(text "ctl_alu_op2_sel_lq" (rect 160 619 235 631)(font "Arial" ))
(line (pt 256 624)(pt 240 624))
(text "ctl_alu_op2_sel_lq" (rect 0 0 73 12)(font "Arial" ))
(text "ctl_alu_op2_sel_lq" (rect 162 619 235 631)(font "Arial" ))
(line (pt 256 624)(pt 240 624)(line_width 1))
)
(port
(pt 256 640)
(output)
(text "ctl_alu_sel_op2_neg" (rect 0 0 99 12)(font "Arial" ))
(text "ctl_alu_sel_op2_neg" (rect 152 635 235 647)(font "Arial" ))
(line (pt 256 640)(pt 240 640))
(text "ctl_alu_sel_op2_neg" (rect 0 0 81 12)(font "Arial" ))
(text "ctl_alu_sel_op2_neg" (rect 154 635 235 647)(font "Arial" ))
(line (pt 256 640)(pt 240 640)(line_width 1))
)
(port
(pt 256 656)
(output)
(text "ctl_alu_sel_op2_high" (rect 0 0 101 12)(font "Arial" ))
(text "ctl_alu_sel_op2_high" (rect 150 651 235 663)(font "Arial" ))
(line (pt 256 656)(pt 240 656))
(text "ctl_alu_sel_op2_high" (rect 0 0 82 12)(font "Arial" ))
(text "ctl_alu_sel_op2_high" (rect 153 651 235 663)(font "Arial" ))
(line (pt 256 656)(pt 240 656)(line_width 1))
)
(port
(pt 256 672)
(output)
(text "ctl_alu_core_R" (rect 0 0 73 12)(font "Arial" ))
(text "ctl_alu_core_R" (rect 174 667 235 679)(font "Arial" ))
(line (pt 256 672)(pt 240 672))
(text "ctl_alu_core_R" (rect 0 0 62 12)(font "Arial" ))
(text "ctl_alu_core_R" (rect 173 667 235 679)(font "Arial" ))
(line (pt 256 672)(pt 240 672)(line_width 1))
)
(port
(pt 256 688)
(output)
(text "ctl_alu_core_V" (rect 0 0 73 12)(font "Arial" ))
(text "ctl_alu_core_V" (rect 174 683 235 695)(font "Arial" ))
(line (pt 256 688)(pt 240 688))
(text "ctl_alu_core_V" (rect 0 0 62 12)(font "Arial" ))
(text "ctl_alu_core_V" (rect 173 683 235 695)(font "Arial" ))
(line (pt 256 688)(pt 240 688)(line_width 1))
)
(port
(pt 256 704)
(output)
(text "ctl_alu_core_S" (rect 0 0 71 12)(font "Arial" ))
(text "ctl_alu_core_S" (rect 0 0 60 12)(font "Arial" ))
(text "ctl_alu_core_S" (rect 175 699 235 711)(font "Arial" ))
(line (pt 256 704)(pt 240 704))
(line (pt 256 704)(pt 240 704)(line_width 1))
)
(port
(pt 256 720)
(output)
(text "ctl_flags_oe" (rect 0 0 60 12)(font "Arial" ))
(text "ctl_flags_oe" (rect 185 715 235 727)(font "Arial" ))
(line (pt 256 720)(pt 240 720))
(text "ctl_flags_oe" (rect 0 0 48 12)(font "Arial" ))
(text "ctl_flags_oe" (rect 187 715 235 727)(font "Arial" ))
(line (pt 256 720)(pt 240 720)(line_width 1))
)
(port
(pt 256 736)
(output)
(text "ctl_flags_bus" (rect 0 0 66 12)(font "Arial" ))
(text "ctl_flags_bus" (rect 180 731 235 743)(font "Arial" ))
(line (pt 256 736)(pt 240 736))
(text "ctl_flags_bus" (rect 0 0 53 12)(font "Arial" ))
(text "ctl_flags_bus" (rect 182 731 235 743)(font "Arial" ))
(line (pt 256 736)(pt 240 736)(line_width 1))
)
(port
(pt 256 752)
(output)
(text "ctl_flags_alu" (rect 0 0 62 12)(font "Arial" ))
(text "ctl_flags_alu" (rect 183 747 235 759)(font "Arial" ))
(line (pt 256 752)(pt 240 752))
(text "ctl_flags_alu" (rect 0 0 49 12)(font "Arial" ))
(text "ctl_flags_alu" (rect 186 747 235 759)(font "Arial" ))
(line (pt 256 752)(pt 240 752)(line_width 1))
)
(port
(pt 256 768)
(output)
(text "ctl_flags_nf_set" (rect 0 0 80 12)(font "Arial" ))
(text "ctl_flags_nf_set" (rect 168 763 235 775)(font "Arial" ))
(line (pt 256 768)(pt 240 768))
(text "ctl_flags_nf_set" (rect 0 0 64 12)(font "Arial" ))
(text "ctl_flags_nf_set" (rect 171 763 235 775)(font "Arial" ))
(line (pt 256 768)(pt 240 768)(line_width 1))
)
(port
(pt 256 784)
(output)
(text "ctl_flags_cf_set" (rect 0 0 80 12)(font "Arial" ))
(text "ctl_flags_cf_set" (rect 168 779 235 791)(font "Arial" ))
(line (pt 256 784)(pt 240 784))
(text "ctl_flags_cf_set" (rect 0 0 64 12)(font "Arial" ))
(text "ctl_flags_cf_set" (rect 171 779 235 791)(font "Arial" ))
(line (pt 256 784)(pt 240 784)(line_width 1))
)
(port
(pt 256 800)
(output)
(text "ctl_flags_cf_cpl" (rect 0 0 79 12)(font "Arial" ))
(text "ctl_flags_cf_cpl" (rect 169 795 235 807)(font "Arial" ))
(line (pt 256 800)(pt 240 800))
(text "ctl_flags_cf_cpl" (rect 0 0 63 12)(font "Arial" ))
(text "ctl_flags_cf_cpl" (rect 172 795 235 807)(font "Arial" ))
(line (pt 256 800)(pt 240 800)(line_width 1))
)
(port
(pt 256 816)
(output)
(text "ctl_flags_cf_we" (rect 0 0 77 12)(font "Arial" ))
(text "ctl_flags_cf_we" (rect 170 811 235 823)(font "Arial" ))
(line (pt 256 816)(pt 240 816))
(text "ctl_flags_cf_we" (rect 0 0 63 12)(font "Arial" ))
(text "ctl_flags_cf_we" (rect 172 811 235 823)(font "Arial" ))
(line (pt 256 816)(pt 240 816)(line_width 1))
)
(port
(pt 256 832)
(output)
(text "ctl_flags_sz_we" (rect 0 0 77 12)(font "Arial" ))
(text "ctl_flags_sz_we" (rect 170 827 235 839)(font "Arial" ))
(line (pt 256 832)(pt 240 832))
(text "ctl_flags_sz_we" (rect 0 0 63 12)(font "Arial" ))
(text "ctl_flags_sz_we" (rect 172 827 235 839)(font "Arial" ))
(line (pt 256 832)(pt 240 832)(line_width 1))
)
(port
(pt 256 848)
(output)
(text "ctl_flags_xy_we" (rect 0 0 80 12)(font "Arial" ))
(text "ctl_flags_xy_we" (rect 168 843 235 855)(font "Arial" ))
(line (pt 256 848)(pt 240 848))
(text "ctl_flags_xy_we" (rect 0 0 66 12)(font "Arial" ))
(text "ctl_flags_xy_we" (rect 169 843 235 855)(font "Arial" ))
(line (pt 256 848)(pt 240 848)(line_width 1))
)
(port
(pt 256 864)
(output)
(text "ctl_flags_hf_we" (rect 0 0 77 12)(font "Arial" ))
(text "ctl_flags_hf_we" (rect 170 859 235 871)(font "Arial" ))
(line (pt 256 864)(pt 240 864))
(text "ctl_flags_hf_we" (rect 0 0 63 12)(font "Arial" ))
(text "ctl_flags_hf_we" (rect 172 859 235 871)(font "Arial" ))
(line (pt 256 864)(pt 240 864)(line_width 1))
)
(port
(pt 256 880)
(output)
(text "ctl_flags_pf_we" (rect 0 0 77 12)(font "Arial" ))
(text "ctl_flags_pf_we" (rect 170 875 235 887)(font "Arial" ))
(line (pt 256 880)(pt 240 880))
(text "ctl_flags_pf_we" (rect 0 0 63 12)(font "Arial" ))
(text "ctl_flags_pf_we" (rect 172 875 235 887)(font "Arial" ))
(line (pt 256 880)(pt 240 880)(line_width 1))
)
(port
(pt 256 896)
(output)
(text "ctl_flags_nf_we" (rect 0 0 77 12)(font "Arial" ))
(text "ctl_flags_nf_we" (rect 170 891 235 903)(font "Arial" ))
(line (pt 256 896)(pt 240 896))
(text "ctl_flags_nf_we" (rect 0 0 63 12)(font "Arial" ))
(text "ctl_flags_nf_we" (rect 172 891 235 903)(font "Arial" ))
(line (pt 256 896)(pt 240 896)(line_width 1))
)
(port
(pt 256 912)
(output)
(text "ctl_flags_cf2_we" (rect 0 0 83 12)(font "Arial" ))
(text "ctl_flags_cf2_we" (rect 165 907 235 919)(font "Arial" ))
(line (pt 256 912)(pt 240 912))
(text "ctl_flags_cf2_we" (rect 0 0 68 12)(font "Arial" ))
(text "ctl_flags_cf2_we" (rect 167 907 235 919)(font "Arial" ))
(line (pt 256 912)(pt 240 912)(line_width 1))
)
(port
(pt 256 928)
(output)
(text "ctl_flags_hf_cpl" (rect 0 0 79 12)(font "Arial" ))
(text "ctl_flags_hf_cpl" (rect 169 923 235 935)(font "Arial" ))
(line (pt 256 928)(pt 240 928))
(text "ctl_flags_hf_cpl" (rect 0 0 63 12)(font "Arial" ))
(text "ctl_flags_hf_cpl" (rect 172 923 235 935)(font "Arial" ))
(line (pt 256 928)(pt 240 928)(line_width 1))
)
(port
(pt 256 944)
(output)
(text "ctl_flags_use_cf2" (rect 0 0 88 12)(font "Arial" ))
(text "ctl_flags_use_cf2" (rect 161 939 235 951)(font "Arial" ))
(line (pt 256 944)(pt 240 944))
(text "ctl_flags_use_cf2" (rect 0 0 71 12)(font "Arial" ))
(text "ctl_flags_use_cf2" (rect 164 939 235 951)(font "Arial" ))
(line (pt 256 944)(pt 240 944)(line_width 1))
)
(port
(pt 256 960)
(output)
(text "ctl_flags_hf2_we" (rect 0 0 83 12)(font "Arial" ))
(text "ctl_flags_hf2_we" (rect 165 955 235 967)(font "Arial" ))
(line (pt 256 960)(pt 240 960))
(text "ctl_flags_hf2_we" (rect 0 0 68 12)(font "Arial" ))
(text "ctl_flags_hf2_we" (rect 167 955 235 967)(font "Arial" ))
(line (pt 256 960)(pt 240 960)(line_width 1))
)
(port
(pt 256 976)
(output)
(text "ctl_flags_nf_clr" (rect 0 0 76 12)(font "Arial" ))
(text "ctl_flags_nf_clr" (rect 171 971 235 983)(font "Arial" ))
(line (pt 256 976)(pt 240 976))
(text "ctl_flags_nf_clr" (rect 0 0 62 12)(font "Arial" ))
(text "ctl_flags_nf_clr" (rect 173 971 235 983)(font "Arial" ))
(line (pt 256 976)(pt 240 976)(line_width 1))
)
(port
(pt 256 992)
(output)
(text "ctl_alu_zero_16bit" (rect 0 0 87 12)(font "Arial" ))
(text "ctl_alu_zero_16bit" (rect 162 987 235 999)(font "Arial" ))
(line (pt 256 992)(pt 240 992))
(text "ctl_alu_zero_16bit" (rect 0 0 69 12)(font "Arial" ))
(text "ctl_alu_zero_16bit" (rect 166 987 235 999)(font "Arial" ))
(line (pt 256 992)(pt 240 992)(line_width 1))
)
(port
(pt 256 1008)
(output)
(text "ctl_flags_cf2_sel[1..0]" (rect 0 0 110 12)(font "Arial" ))
(text "ctl_flags_cf2_sel[1..0]" (rect 142 1003 235 1015)(font "Arial" ))
(line (pt 256 1008)(pt 240 1008)(line_width 3))
(text "ctl_flags_cf2_sel_shift" (rect 0 0 90 12)(font "Arial" ))
(text "ctl_flags_cf2_sel_shift" (rect 145 1003 235 1015)(font "Arial" ))
(line (pt 256 1008)(pt 240 1008)(line_width 1))
)
(port
(pt 256 1024)
(output)
(text "ctl_sw_4d" (rect 0 0 48 12)(font "Arial" ))
(text "ctl_sw_4d" (rect 195 1019 235 1031)(font "Arial" ))
(line (pt 256 1024)(pt 240 1024))
(text "ctl_flags_cf2_sel_daa" (rect 0 0 88 12)(font "Arial" ))
(text "ctl_flags_cf2_sel_daa" (rect 147 1019 235 1031)(font "Arial" ))
(line (pt 256 1024)(pt 240 1024)(line_width 1))
)
(port
(pt 256 1040)
(output)
(text "ctl_sw_4u" (rect 0 0 48 12)(font "Arial" ))
(text "ctl_sw_4u" (rect 195 1035 235 1047)(font "Arial" ))
(line (pt 256 1040)(pt 240 1040))
(text "ctl_sw_4u" (rect 0 0 41 12)(font "Arial" ))
(text "ctl_sw_4u" (rect 194 1035 235 1047)(font "Arial" ))
(line (pt 256 1040)(pt 240 1040)(line_width 1))
)
(port
(pt 256 1056)
(output)
(text "ctl_reg_in_hi" (rect 0 0 61 12)(font "Arial" ))
(text "ctl_reg_in_hi" (rect 184 1051 235 1063)(font "Arial" ))
(line (pt 256 1056)(pt 240 1056))
(text "ctl_reg_in_hi" (rect 0 0 50 12)(font "Arial" ))
(text "ctl_reg_in_hi" (rect 185 1051 235 1063)(font "Arial" ))
(line (pt 256 1056)(pt 240 1056)(line_width 1))
)
(port
(pt 256 1072)
(output)
(text "ctl_reg_in_lo" (rect 0 0 61 12)(font "Arial" ))
(text "ctl_reg_in_lo" (rect 184 1067 235 1079)(font "Arial" ))
(line (pt 256 1072)(pt 240 1072))
(text "ctl_reg_in_lo" (rect 0 0 50 12)(font "Arial" ))
(text "ctl_reg_in_lo" (rect 185 1067 235 1079)(font "Arial" ))
(line (pt 256 1072)(pt 240 1072)(line_width 1))
)
(port
(pt 256 1088)
(output)
(text "ctl_reg_out_lo" (rect 0 0 68 12)(font "Arial" ))
(text "ctl_reg_out_lo" (rect 178 1083 235 1095)(font "Arial" ))
(line (pt 256 1088)(pt 240 1088))
(text "ctl_reg_out_lo" (rect 0 0 56 12)(font "Arial" ))
(text "ctl_reg_out_lo" (rect 179 1083 235 1095)(font "Arial" ))
(line (pt 256 1088)(pt 240 1088)(line_width 1))
)
(port
(pt 256 1104)
(output)
(text "ctl_reg_out_hi" (rect 0 0 68 12)(font "Arial" ))
(text "ctl_reg_out_hi" (rect 178 1099 235 1111)(font "Arial" ))
(line (pt 256 1104)(pt 240 1104))
(text "ctl_reg_out_hi" (rect 0 0 56 12)(font "Arial" ))
(text "ctl_reg_out_hi" (rect 179 1099 235 1111)(font "Arial" ))
(line (pt 256 1104)(pt 240 1104)(line_width 1))
)
(port
(pt 256 1120)
(output)
(text "ctl_reg_exx" (rect 0 0 56 12)(font "Arial" ))
(text "ctl_reg_exx" (rect 0 0 47 12)(font "Arial" ))
(text "ctl_reg_exx" (rect 188 1115 235 1127)(font "Arial" ))
(line (pt 256 1120)(pt 240 1120))
(line (pt 256 1120)(pt 240 1120)(line_width 1))
)
(port
(pt 256 1136)
(output)
(text "ctl_reg_ex_af" (rect 0 0 67 12)(font "Arial" ))
(text "ctl_reg_ex_af" (rect 0 0 56 12)(font "Arial" ))
(text "ctl_reg_ex_af" (rect 179 1131 235 1143)(font "Arial" ))
(line (pt 256 1136)(pt 240 1136))
(line (pt 256 1136)(pt 240 1136)(line_width 1))
)
(port
(pt 256 1152)
(output)
(text "ctl_reg_ex_de_hl" (rect 0 0 82 12)(font "Arial" ))
(text "ctl_reg_ex_de_hl" (rect 0 0 69 12)(font "Arial" ))
(text "ctl_reg_ex_de_hl" (rect 166 1147 235 1159)(font "Arial" ))
(line (pt 256 1152)(pt 240 1152))
(line (pt 256 1152)(pt 240 1152)(line_width 1))
)
(port
(pt 256 1168)
(output)
(text "ctl_reg_use_sp" (rect 0 0 74 12)(font "Arial" ))
(text "ctl_reg_use_sp" (rect 0 0 62 12)(font "Arial" ))
(text "ctl_reg_use_sp" (rect 173 1163 235 1175)(font "Arial" ))
(line (pt 256 1168)(pt 240 1168))
(line (pt 256 1168)(pt 240 1168)(line_width 1))
)
(port
(pt 256 1184)
(output)
(text "ctl_reg_sel_pc" (rect 0 0 70 12)(font "Arial" ))
(text "ctl_reg_sel_pc" (rect 0 0 59 12)(font "Arial" ))
(text "ctl_reg_sel_pc" (rect 176 1179 235 1191)(font "Arial" ))
(line (pt 256 1184)(pt 240 1184))
(line (pt 256 1184)(pt 240 1184)(line_width 1))
)
(port
(pt 256 1200)
(output)
(text "ctl_reg_sel_ir" (rect 0 0 64 12)(font "Arial" ))
(text "ctl_reg_sel_ir" (rect 0 0 54 12)(font "Arial" ))
(text "ctl_reg_sel_ir" (rect 181 1195 235 1207)(font "Arial" ))
(line (pt 256 1200)(pt 240 1200))
(line (pt 256 1200)(pt 240 1200)(line_width 1))
)
(port
(pt 256 1216)
(output)
(text "ctl_reg_sel_wz" (rect 0 0 70 12)(font "Arial" ))
(text "ctl_reg_sel_wz" (rect 0 0 59 12)(font "Arial" ))
(text "ctl_reg_sel_wz" (rect 176 1211 235 1223)(font "Arial" ))
(line (pt 256 1216)(pt 240 1216))
(line (pt 256 1216)(pt 240 1216)(line_width 1))
)
(port
(pt 256 1232)
(output)
(text "ctl_reg_gp_we" (rect 0 0 69 12)(font "Arial" ))
(text "ctl_reg_gp_we" (rect 177 1227 235 1239)(font "Arial" ))
(line (pt 256 1232)(pt 240 1232))
(text "ctl_reg_gp_we" (rect 0 0 59 12)(font "Arial" ))
(text "ctl_reg_gp_we" (rect 176 1227 235 1239)(font "Arial" ))
(line (pt 256 1232)(pt 240 1232)(line_width 1))
)
(port
(pt 256 1248)
(output)
(text "ctl_reg_not_pc" (rect 0 0 71 12)(font "Arial" ))
(text "ctl_reg_not_pc" (rect 0 0 60 12)(font "Arial" ))
(text "ctl_reg_not_pc" (rect 175 1243 235 1255)(font "Arial" ))
(line (pt 256 1248)(pt 240 1248))
(line (pt 256 1248)(pt 240 1248)(line_width 1))
)
(port
(pt 256 1264)
(output)
(text "ctl_reg_sys_we_lo" (rect 0 0 90 12)(font "Arial" ))
(text "ctl_reg_sys_we_lo" (rect 0 0 76 12)(font "Arial" ))
(text "ctl_reg_sys_we_lo" (rect 159 1259 235 1271)(font "Arial" ))
(line (pt 256 1264)(pt 240 1264))
(line (pt 256 1264)(pt 240 1264)(line_width 1))
)
(port
(pt 256 1280)
(output)
(text "ctl_reg_sys_we_hi" (rect 0 0 90 12)(font "Arial" ))
(text "ctl_reg_sys_we_hi" (rect 0 0 76 12)(font "Arial" ))
(text "ctl_reg_sys_we_hi" (rect 159 1275 235 1287)(font "Arial" ))
(line (pt 256 1280)(pt 240 1280))
(line (pt 256 1280)(pt 240 1280)(line_width 1))
)
(port
(pt 256 1296)
(output)
(text "ctl_reg_sys_we" (rect 0 0 76 12)(font "Arial" ))
(text "ctl_reg_sys_we" (rect 0 0 64 12)(font "Arial" ))
(text "ctl_reg_sys_we" (rect 171 1291 235 1303)(font "Arial" ))
(line (pt 256 1296)(pt 240 1296))
(line (pt 256 1296)(pt 240 1296)(line_width 1))
)
(port
(pt 256 1312)
(output)
(text "ctl_reg_gp_hilo[1..0]" (rect 0 0 99 12)(font "Arial" ))
(text "ctl_reg_gp_hilo[1..0]" (rect 152 1307 235 1319)(font "Arial" ))
(line (pt 256 1312)(pt 240 1312)(line_width 3))
(text "ctl_sw_4d" (rect 0 0 41 12)(font "Arial" ))
(text "ctl_sw_4d" (rect 194 1307 235 1319)(font "Arial" ))
(line (pt 256 1312)(pt 240 1312)(line_width 1))
)
(port
(pt 256 1328)
(output)
(text "ctl_reg_gp_sel[1..0]" (rect 0 0 96 12)(font "Arial" ))
(text "ctl_reg_gp_sel[1..0]" (rect 154 1323 235 1335)(font "Arial" ))
(text "ctl_reg_gp_hilo[1..0]" (rect 0 0 79 12)(font "Arial" ))
(text "ctl_reg_gp_hilo[1..0]" (rect 156 1323 235 1335)(font "Arial" ))
(line (pt 256 1328)(pt 240 1328)(line_width 3))
)
(port
(pt 256 1344)
(output)
(text "ctl_reg_sys_hilo[1..0]" (rect 0 0 106 12)(font "Arial" ))
(text "ctl_reg_sys_hilo[1..0]" (rect 146 1339 235 1351)(font "Arial" ))
(text "ctl_reg_gp_sel[1..0]" (rect 0 0 77 12)(font "Arial" ))
(text "ctl_reg_gp_sel[1..0]" (rect 158 1339 235 1351)(font "Arial" ))
(line (pt 256 1344)(pt 240 1344)(line_width 3))
)
(port
(pt 256 1360)
(output)
(text "ctl_inc_cy" (rect 0 0 50 12)(font "Arial" ))
(text "ctl_inc_cy" (rect 193 1355 235 1367)(font "Arial" ))
(line (pt 256 1360)(pt 240 1360))
(text "ctl_reg_sys_hilo[1..0]" (rect 0 0 84 12)(font "Arial" ))
(text "ctl_reg_sys_hilo[1..0]" (rect 151 1355 235 1367)(font "Arial" ))
(line (pt 256 1360)(pt 240 1360)(line_width 3))
)
(port
(pt 256 1376)
(output)
(text "ctl_inc_dec" (rect 0 0 55 12)(font "Arial" ))
(text "ctl_inc_dec" (rect 189 1371 235 1383)(font "Arial" ))
(line (pt 256 1376)(pt 240 1376))
(text "ctl_inc_cy" (rect 0 0 41 12)(font "Arial" ))
(text "ctl_inc_cy" (rect 194 1371 235 1383)(font "Arial" ))
(line (pt 256 1376)(pt 240 1376)(line_width 1))
)
(port
(pt 256 1392)
(output)
(text "ctl_inc_zero" (rect 0 0 57 12)(font "Arial" ))
(text "ctl_inc_zero" (rect 187 1387 235 1399)(font "Arial" ))
(line (pt 256 1392)(pt 240 1392))
(text "ctl_inc_dec" (rect 0 0 44 12)(font "Arial" ))
(text "ctl_inc_dec" (rect 191 1387 235 1399)(font "Arial" ))
(line (pt 256 1392)(pt 240 1392)(line_width 1))
)
(port
(pt 256 1408)
(output)
(text "ctl_al_we" (rect 0 0 44 12)(font "Arial" ))
(text "ctl_al_we" (rect 198 1403 235 1415)(font "Arial" ))
(line (pt 256 1408)(pt 240 1408))
(text "ctl_al_we" (rect 0 0 36 12)(font "Arial" ))
(text "ctl_al_we" (rect 199 1403 235 1415)(font "Arial" ))
(line (pt 256 1408)(pt 240 1408)(line_width 1))
)
(port
(pt 256 1424)
(output)
(text "ctl_inc_limit6" (rect 0 0 63 12)(font "Arial" ))
(text "ctl_inc_limit6" (rect 182 1419 235 1431)(font "Arial" ))
(line (pt 256 1424)(pt 240 1424))
(text "ctl_inc_limit6" (rect 0 0 49 12)(font "Arial" ))
(text "ctl_inc_limit6" (rect 186 1419 235 1431)(font "Arial" ))
(line (pt 256 1424)(pt 240 1424)(line_width 1))
)
(port
(pt 256 1440)
(output)
(text "ctl_bus_inc_oe" (rect 0 0 73 12)(font "Arial" ))
(text "ctl_bus_inc_oe" (rect 174 1435 235 1447)(font "Arial" ))
(line (pt 256 1440)(pt 240 1440))
(text "ctl_bus_inc_oe" (rect 0 0 60 12)(font "Arial" ))
(text "ctl_bus_inc_oe" (rect 175 1435 235 1447)(font "Arial" ))
(line (pt 256 1440)(pt 240 1440)(line_width 1))
)
(port
(pt 256 1456)
(output)
(text "ctl_apin_mux" (rect 0 0 64 12)(font "Arial" ))
(text "ctl_apin_mux" (rect 181 1451 235 1463)(font "Arial" ))
(line (pt 256 1456)(pt 240 1456))
(text "ctl_apin_mux" (rect 0 0 53 12)(font "Arial" ))
(text "ctl_apin_mux" (rect 182 1451 235 1463)(font "Arial" ))
(line (pt 256 1456)(pt 240 1456)(line_width 1))
)
(port
(pt 256 1472)
(output)
(text "ctl_apin_mux2" (rect 0 0 70 12)(font "Arial" ))
(text "ctl_apin_mux2" (rect 176 1467 235 1479)(font "Arial" ))
(line (pt 256 1472)(pt 240 1472))
(text "ctl_apin_mux2" (rect 0 0 57 12)(font "Arial" ))
(text "ctl_apin_mux2" (rect 178 1467 235 1479)(font "Arial" ))
(line (pt 256 1472)(pt 240 1472)(line_width 1))
)
(port
(pt 256 1488)
(output)
(text "ctl_bus_ff_oe" (rect 0 0 68 12)(font "Arial" ))
(text "ctl_bus_ff_oe" (rect 178 1483 235 1495)(font "Arial" ))
(line (pt 256 1488)(pt 240 1488))
(text "ctl_bus_ff_oe" (rect 0 0 56 12)(font "Arial" ))
(text "ctl_bus_ff_oe" (rect 179 1483 235 1495)(font "Arial" ))
(line (pt 256 1488)(pt 240 1488)(line_width 1))
)
(port
(pt 256 1504)
(output)
(text "ctl_bus_zero_oe" (rect 0 0 79 12)(font "Arial" ))
(text "ctl_bus_zero_oe" (rect 0 0 66 12)(font "Arial" ))
(text "ctl_bus_zero_oe" (rect 169 1499 235 1511)(font "Arial" ))
(line (pt 256 1504)(pt 240 1504))
(line (pt 256 1504)(pt 240 1504)(line_width 1))
)
(port
(pt 256 1520)
(output)
(text "ctl_bus_db_oe" (rect 0 0 70 12)(font "Arial" ))
(text "ctl_bus_db_oe" (rect 176 1515 235 1527)(font "Arial" ))
(line (pt 256 1520)(pt 240 1520))
(text "ctl_sw_1u" (rect 0 0 38 12)(font "Arial" ))
(text "ctl_sw_1u" (rect 197 1515 235 1527)(font "Arial" ))
(line (pt 256 1520)(pt 240 1520)(line_width 1))
)
(port
(pt 256 1536)
(output)
(text "ctl_sw_1u" (rect 0 0 48 12)(font "Arial" ))
(text "ctl_sw_1u" (rect 195 1531 235 1543)(font "Arial" ))
(line (pt 256 1536)(pt 240 1536))
(text "ctl_sw_1d" (rect 0 0 38 12)(font "Arial" ))
(text "ctl_sw_1d" (rect 197 1531 235 1543)(font "Arial" ))
(line (pt 256 1536)(pt 240 1536)(line_width 1))
)
(port
(pt 256 1552)
(output)
(text "ctl_sw_1d" (rect 0 0 48 12)(font "Arial" ))
(text "ctl_sw_1d" (rect 195 1547 235 1559)(font "Arial" ))
(line (pt 256 1552)(pt 240 1552))
(text "ctl_sw_2u" (rect 0 0 40 12)(font "Arial" ))
(text "ctl_sw_2u" (rect 195 1547 235 1559)(font "Arial" ))
(line (pt 256 1552)(pt 240 1552)(line_width 1))
)
(port
(pt 256 1568)
(output)
(text "ctl_sw_2u" (rect 0 0 48 12)(font "Arial" ))
(text "ctl_sw_2u" (rect 195 1563 235 1575)(font "Arial" ))
(line (pt 256 1568)(pt 240 1568))
(text "ctl_sw_2d" (rect 0 0 40 12)(font "Arial" ))
(text "ctl_sw_2d" (rect 195 1563 235 1575)(font "Arial" ))
(line (pt 256 1568)(pt 240 1568)(line_width 1))
)
(port
(pt 256 1584)
(output)
(text "ctl_sw_2d" (rect 0 0 48 12)(font "Arial" ))
(text "ctl_sw_2d" (rect 195 1579 235 1591)(font "Arial" ))
(line (pt 256 1584)(pt 240 1584))
(text "ctl_sw_mask543_en" (rect 0 0 83 12)(font "Arial" ))
(text "ctl_sw_mask543_en" (rect 152 1579 235 1591)(font "Arial" ))
(line (pt 256 1584)(pt 240 1584)(line_width 1))
)
(port
(pt 256 1600)
(output)
(text "ctl_sw_mask543_en" (rect 0 0 99 12)(font "Arial" ))
(text "ctl_sw_mask543_en" (rect 152 1595 235 1607)(font "Arial" ))
(line (pt 256 1600)(pt 240 1600))
(text "ctl_bus_db_we" (rect 0 0 60 12)(font "Arial" ))
(text "ctl_bus_db_we" (rect 175 1595 235 1607)(font "Arial" ))
(line (pt 256 1600)(pt 240 1600)(line_width 1))
)
(port
(pt 256 1616)
(output)
(text "ctl_bus_db_we" (rect 0 0 71 12)(font "Arial" ))
(text "ctl_bus_db_we" (rect 175 1611 235 1623)(font "Arial" ))
(line (pt 256 1616)(pt 240 1616))
(text "ctl_bus_db_oe" (rect 0 0 59 12)(font "Arial" ))
(text "ctl_bus_db_oe" (rect 176 1611 235 1623)(font "Arial" ))
(line (pt 256 1616)(pt 240 1616)(line_width 1))
)
(port
(pt 256 1632)
(output)
(text "nextM" (rect 0 0 29 12)(font "Arial" ))
(text "nextM" (rect 0 0 24 12)(font "Arial" ))
(text "nextM" (rect 211 1627 235 1639)(font "Arial" ))
(line (pt 256 1632)(pt 240 1632))
(line (pt 256 1632)(pt 240 1632)(line_width 1))
)
(port
(pt 256 1648)
(output)
(text "setM1" (rect 0 0 29 12)(font "Arial" ))
(text "setM1" (rect 211 1643 235 1655)(font "Arial" ))
(line (pt 256 1648)(pt 240 1648))
(text "setM1" (rect 0 0 23 12)(font "Arial" ))
(text "setM1" (rect 212 1643 235 1655)(font "Arial" ))
(line (pt 256 1648)(pt 240 1648)(line_width 1))
)
(port
(pt 256 1664)
(output)
(text "fFetch" (rect 0 0 33 12)(font "Arial" ))
(text "fFetch" (rect 208 1659 235 1671)(font "Arial" ))
(line (pt 256 1664)(pt 240 1664))
(text "fFetch" (rect 0 0 25 12)(font "Arial" ))
(text "fFetch" (rect 210 1659 235 1671)(font "Arial" ))
(line (pt 256 1664)(pt 240 1664)(line_width 1))
)
(port
(pt 256 1680)
(output)
(text "fMRead" (rect 0 0 38 12)(font "Arial" ))
(text "fMRead" (rect 203 1675 235 1687)(font "Arial" ))
(line (pt 256 1680)(pt 240 1680))
(text "fMRead" (rect 0 0 34 12)(font "Arial" ))
(text "fMRead" (rect 201 1675 235 1687)(font "Arial" ))
(line (pt 256 1680)(pt 240 1680)(line_width 1))
)
(port
(pt 256 1696)
(output)
(text "fMWrite" (rect 0 0 38 12)(font "Arial" ))
(text "fMWrite" (rect 203 1691 235 1703)(font "Arial" ))
(line (pt 256 1696)(pt 240 1696))
(text "fMWrite" (rect 0 0 34 12)(font "Arial" ))
(text "fMWrite" (rect 201 1691 235 1703)(font "Arial" ))
(line (pt 256 1696)(pt 240 1696)(line_width 1))
)
(port
(pt 256 1712)
(output)
(text "fIORead" (rect 0 0 42 12)(font "Arial" ))
(text "fIORead" (rect 0 0 35 12)(font "Arial" ))
(text "fIORead" (rect 200 1707 235 1719)(font "Arial" ))
(line (pt 256 1712)(pt 240 1712))
(line (pt 256 1712)(pt 240 1712)(line_width 1))
)
(port
(pt 256 1728)
(output)
(text "fIOWrite" (rect 0 0 42 12)(font "Arial" ))
(text "fIOWrite" (rect 0 0 35 12)(font "Arial" ))
(text "fIOWrite" (rect 200 1723 235 1735)(font "Arial" ))
(line (pt 256 1728)(pt 240 1728))
(line (pt 256 1728)(pt 240 1728)(line_width 1))
)
(drawing
(rectangle (rect 16 16 240 1760))
(rectangle (rect 16 16 240 1760)(line_width 1))
)
)
/execute.v
78,9 → 78,8
reg validPLA; // Valid PLA asserts this reg
// Activates a state machine to compute WZ=IX+d; takes 5T cycles
reg ixy_d; // Compute WX=IX+d
// Signals the setting of IX/IY and CB/ED prefix flags; inhibits clearing them
// Signals the setting of IX/IY prefix flags; inhibits clearing them
reg setIXIY; // Set IX/IY flag at the next T cycle
reg setCBED; // Set CB or ED flag at the next T cycle
// Holds asserted by non-repeating versions of block instructions (LDI/CPI,...)
reg nonRep; // Non-repeating block instruction
// Suspends incrementing PC through address latch unless in HALT or interrupt mode
139,7 → 138,6
fMRead = 0; fMWrite = 0; fIORead = 0; fIOWrite = 0;
ixy_d = 0;
setIXIY = 0;
setCBED = 0;
nonRep = 0;
pc_inc_hold = 0;
 
/gencompile.py
42,7 → 42,7
def is_ctl(name):
return name.startswith('ctl_') or name=='validPLA' or name=='nextM' or name=='setM1' \
or name=='fFetch' or name=='fMRead' or name=='fMWrite' or name=='fIORead' or name=='fIOWrite' \
or name=='ixy_d' or name=='setIXIY' or name=='setCBED' or name=='nonRep' or name=='pc_inc_hold'
or name=='ixy_d' or name=='setIXIY' or name=='nonRep' or name=='pc_inc_hold'
 
def str2tok(s):
t = io.BytesIO(bytes(s.encode()))
/ir.bdf
21,7 → 21,7
(header "graphic" (version "1.4"))
(pin
(input)
(rect 40 80 216 96)
(rect 40 88 216 104)
(text "INPUT" (rect 133 0 161 10)(font "Arial" (font_size 6)))
(text "ctl_ir_we" (rect 9 0 51 12)(font "Arial" ))
(pt 176 8)
69,7 → 69,7
)
(pin
(input)
(rect 40 120 216 136)
(rect 40 152 216 168)
(text "INPUT" (rect 133 0 161 10)(font "Arial" (font_size 6)))
(text "nreset" (rect 9 0 39 12)(font "Arial" ))
(pt 176 8)
84,6 → 84,22
(text "VCC" (rect 136 7 156 17)(font "Arial" (font_size 6)))
)
(pin
(input)
(rect 40 120 216 136)
(text "INPUT" (rect 133 0 161 10)(font "Arial" (font_size 6)))
(text "hold_clk_wait" (rect 9 0 73 12)(font "Arial" ))
(pt 176 8)
(drawing
(line (pt 92 12)(pt 117 12))
(line (pt 92 4)(pt 117 4))
(line (pt 121 8)(pt 176 8))
(line (pt 92 12)(pt 92 4))
(line (pt 117 4)(pt 121 8))
(line (pt 117 12)(pt 121 8))
)
(text "VCC" (rect 136 7 156 17)(font "Arial" (font_size 6)))
)
(pin
(output)
(rect 504 48 680 64)
(text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6)))
156,6 → 172,63
(circle (rect 28 68 36 76))
)
)
(symbol
(rect 296 80 360 128)
(text "AND2" (rect 1 0 25 10)(font "Arial" (font_size 6)))
(text "inst5" (rect 3 37 26 49)(font "Arial" ))
(port
(pt 0 16)
(input)
(text "IN1" (rect 2 7 19 19)(font "Courier New" (bold))(invisible))
(text "IN1" (rect 2 7 19 19)(font "Courier New" (bold))(invisible))
(line (pt 0 16)(pt 14 16))
)
(port
(pt 0 32)
(input)
(text "IN2" (rect 2 23 19 35)(font "Courier New" (bold))(invisible))
(text "IN2" (rect 2 23 19 35)(font "Courier New" (bold))(invisible))
(line (pt 0 32)(pt 14 32))
)
(port
(pt 64 24)
(output)
(text "OUT" (rect 48 15 65 27)(font "Courier New" (bold))(invisible))
(text "OUT" (rect 48 15 65 27)(font "Courier New" (bold))(invisible))
(line (pt 42 24)(pt 64 24))
)
(drawing
(line (pt 14 12)(pt 30 12))
(line (pt 14 37)(pt 31 37))
(line (pt 14 12)(pt 14 37))
(arc (pt 31 37)(pt 30 12)(rect 18 12 43 37))
)
)
(symbol
(rect 232 112 280 144)
(text "NOT" (rect 1 0 21 10)(font "Arial" (font_size 6)))
(text "inst3" (rect 3 21 26 33)(font "Arial" ))
(port
(pt 0 16)
(input)
(text "IN" (rect 2 7 13 19)(font "Courier New" (bold))(invisible))
(text "IN" (rect 2 7 13 19)(font "Courier New" (bold))(invisible))
(line (pt 0 16)(pt 13 16))
)
(port
(pt 48 16)
(output)
(text "OUT" (rect 32 7 49 19)(font "Courier New" (bold))(invisible))
(text "OUT" (rect 32 7 49 19)(font "Courier New" (bold))(invisible))
(line (pt 39 16)(pt 48 16))
)
(drawing
(line (pt 13 25)(pt 13 7))
(line (pt 13 7)(pt 31 16))
(line (pt 13 25)(pt 31 16))
(circle (rect 31 12 39 20))
)
)
(connector
(pt 216 56)
(pt 392 56)
171,26 → 244,54
(bus)
)
(connector
(pt 216 88)
(pt 392 88)
(pt 376 88)
)
(connector
(pt 216 128)
(pt 424 128)
(pt 424 160)
(pt 216 160)
)
(connector
(pt 424 128)
(pt 424 112)
(pt 424 160)
)
(text "8 latches implement the opcode Instruction Register" (rect 352 160 643 174)(font "Arial" (font_size 8)))
(connector
(pt 216 128)
(pt 232 128)
)
(connector
(pt 376 88)
(pt 376 104)
)
(connector
(pt 376 104)
(pt 360 104)
)
(connector
(pt 216 96)
(pt 296 96)
)
(connector
(pt 280 128)
(pt 288 128)
)
(connector
(pt 296 112)
(pt 288 112)
)
(connector
(pt 288 112)
(pt 288 128)
)
(text "8 latches implement the opcode Instruction Register" (rect 328 216 619 230)(font "Arial" (font_size 8)))
(title_block
(rect 40 160 297 212)
(rect 40 216 297 268)
(name "title-custom-small")
(section (rect 0 35 256 51)(text "DATE" (rect 2 0 30 12)(font "Arial" ))(text "May 3, 2014, 2016" (rect 56 3 161 17)(font "Arial" (font_size 8)))(border))
(section (rect 0 18 256 34)(text "DESIGNER" (rect 2 0 59 12)(font "Arial" ))(text "Goran Devic" (rect 56 2 135 17)(font "Arial" (font_size 9)))(border))
(section (rect 104 0 256 17)(text "MODULE" (rect 2 1 48 13)(font "Arial" ))(text "ir" (rect 43 2 52 17)(font "Arial" (font_size 9)(bold)))(border))
(section (rect 0 0 256 17)(text "PROJECT" (rect 2 0 52 12)(font "Arial" ))(text "A-Z80" (rect 56 2 94 17)(font "Arial" (font_size 9)(bold)))(border))
(section (rect 192 35 256 51)(text "REV" (rect 2 1 25 13)(font "Arial" ))(text "1.3" (rect 43 3 60 17)(font "Arial" (font_size 8)))(border))
(section (rect 192 35 256 51)(text "REV" (rect 2 1 25 13)(font "Arial" ))(text "1.4" (rect 43 3 60 17)(font "Arial" (font_size 8)))(border))
(drawing
)
)
/ir.bsf
20,7 → 20,7
*/
(header "symbol" (version "1.2"))
(symbol
(rect 16 16 192 144)
(rect 16 16 216 144)
(text "ir" (rect 5 0 12 14)(font "Arial" (font_size 8)))
(text "inst" (rect 8 112 25 124)(font "Arial" ))
(port
47,18 → 47,25
(port
(pt 0 80)
(input)
(text "nreset" (rect 0 0 36 14)(font "Arial" (font_size 8)))
(text "nreset" (rect 21 75 57 89)(font "Arial" (font_size 8)))
(text "hold_clk_wait" (rect 0 0 77 14)(font "Arial" (font_size 8)))
(text "hold_clk_wait" (rect 21 75 98 89)(font "Arial" (font_size 8)))
(line (pt 0 80)(pt 16 80))
)
(port
(pt 176 32)
(pt 0 96)
(input)
(text "nreset" (rect 0 0 36 14)(font "Arial" (font_size 8)))
(text "nreset" (rect 21 91 57 105)(font "Arial" (font_size 8)))
(line (pt 0 96)(pt 16 96))
)
(port
(pt 200 32)
(output)
(text "opcode[7..0]" (rect 0 0 70 14)(font "Arial" (font_size 8)))
(text "opcode[7..0]" (rect 85 27 155 41)(font "Arial" (font_size 8)))
(line (pt 176 32)(pt 160 32)(line_width 3))
(text "opcode[7..0]" (rect 109 27 179 41)(font "Arial" (font_size 8)))
(line (pt 200 32)(pt 184 32)(line_width 3))
)
(drawing
(rectangle (rect 16 16 160 112))
(rectangle (rect 16 16 184 112))
)
)
/ir.v
20,6 → 20,7
ctl_ir_we,
clk,
nreset,
hold_clk_wait,
db,
opcode
);
28,14 → 29,21
input wire ctl_ir_we;
input wire clk;
input wire nreset;
input wire hold_clk_wait;
input wire [7:0] db;
output reg [7:0] opcode;
 
wire SYNTHESIZED_WIRE_0;
wire SYNTHESIZED_WIRE_1;
 
 
 
 
assign SYNTHESIZED_WIRE_0 = ~hold_clk_wait;
 
assign SYNTHESIZED_WIRE_1 = ctl_ir_we & SYNTHESIZED_WIRE_0;
 
 
always@(posedge clk or negedge nreset)
begin
if (!nreset)
43,7 → 51,7
opcode[7:0] <= 8'b00000000;
end
else
if (ctl_ir_we)
if (SYNTHESIZED_WIRE_1)
begin
opcode[7:0] <= db[7:0];
end
/memory_ifc.bdf
229,7 → 229,7
)
(pin
(output)
(rect 800 80 976 96)
(rect 800 184 976 200)
(text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6)))
(text "nM1_out" (rect 90 0 131 12)(font "Arial" ))
(pt 0 8)
339,6 → 339,22
(line (pt 78 12)(pt 82 8))
)
)
(pin
(output)
(rect 800 472 976 488)
(text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6)))
(text "wait_m1" (rect 90 0 130 12)(font "Arial" ))
(pt 0 8)
(drawing
(line (pt 0 8)(pt 52 8))
(line (pt 52 4)(pt 78 4))
(line (pt 52 12)(pt 78 12))
(line (pt 52 12)(pt 52 4))
(line (pt 78 4)(pt 82 8))
(line (pt 82 8)(pt 78 12))
(line (pt 78 12)(pt 82 8))
)
)
(symbol
(rect 640 112 688 144)
(text "NOT" (rect 1 0 21 10)(font "Arial" (font_size 6)))
2152,6 → 2168,64
(circle (rect 31 12 39 20))
)
)
(symbol
(rect 720 168 784 216)
(text "OR2" (rect 1 0 19 10)(font "Arial" (font_size 6)))
(text "inst41" (rect 3 37 32 49)(font "Arial" ))
(port
(pt 0 32)
(input)
(text "IN2" (rect 2 23 19 35)(font "Courier New" (bold))(invisible))
(text "IN2" (rect 2 23 19 35)(font "Courier New" (bold))(invisible))
(line (pt 0 32)(pt 15 32))
)
(port
(pt 0 16)
(input)
(text "IN1" (rect 2 7 19 19)(font "Courier New" (bold))(invisible))
(text "IN1" (rect 2 7 19 19)(font "Courier New" (bold))(invisible))
(line (pt 0 16)(pt 15 16))
)
(port
(pt 64 24)
(output)
(text "OUT" (rect 48 15 65 27)(font "Courier New" (bold))(invisible))
(text "OUT" (rect 48 15 62 27)(font "Courier New" (bold))(invisible))
(line (pt 48 24)(pt 64 24))
)
(drawing
(line (pt 14 36)(pt 25 36))
(line (pt 14 13)(pt 25 13))
(arc (pt 7 29)(pt 7 19)(rect -14 8 19 41))
(arc (pt 49 24)(pt 25 13)(rect -6 13 57 76))
(arc (pt 25 35)(pt 49 24)(rect -6 -27 57 36))
)
)
(symbol
(rect 640 184 688 216)
(text "NOT" (rect 1 0 21 10)(font "Arial" (font_size 6)))
(text "notff1" (rect 3 21 33 33)(font "Arial" ))
(port
(pt 0 16)
(input)
(text "IN" (rect 2 7 13 19)(font "Courier New" (bold))(invisible))
(text "IN" (rect 2 7 13 19)(font "Courier New" (bold))(invisible))
(line (pt 0 16)(pt 13 16))
)
(port
(pt 48 16)
(output)
(text "OUT" (rect 32 7 49 19)(font "Courier New" (bold))(invisible))
(text "OUT" (rect 32 7 46 19)(font "Courier New" (bold))(invisible))
(line (pt 39 16)(pt 48 16))
)
(drawing
(line (pt 13 25)(pt 13 7))
(line (pt 13 7)(pt 31 16))
(line (pt 13 25)(pt 31 16))
(circle (rect 31 12 39 20))
)
)
(connector
(pt 704 112)
(pt 720 112)
2161,10 → 2235,6
(pt 320 128)
)
(connector
(pt 704 88)
(pt 704 112)
)
(connector
(pt 416 304)
(pt 416 264)
)
2214,10 → 2284,6
(pt 704 88)
)
(connector
(pt 704 88)
(pt 800 88)
)
(connector
(pt 400 88)
(pt 400 128)
)
2243,7 → 2309,7
(pt 448 304)
)
(connector
(text "nq2" (rect 698 112 715 124)(font "Arial" ))
(text "nq2" (rect 690 96 707 108)(font "Arial" ))
(pt 688 128)
(pt 720 128)
)
2286,10 → 2352,6
(pt 528 304)
)
(connector
(pt 592 184)
(pt 592 232)
)
(connector
(pt 480 184)
(pt 480 232)
)
2583,15 → 2645,6
(pt 544 520)
)
(connector
(pt 512 480)
(pt 624 480)
)
(connector
(text "wait_m1" (rect 824 464 864 476)(font "Arial" ))
(pt 624 480)
(pt 864 480)
)
(connector
(pt 496 720)
(pt 512 720)
)
3472,13 → 3525,53
(pt 688 1808)
)
(connector
(pt 784 192)
(pt 800 192)
)
(connector
(pt 720 184)
(pt 704 184)
)
(connector
(pt 704 88)
(pt 704 112)
)
(connector
(pt 704 112)
(pt 704 184)
)
(connector
(pt 592 200)
(pt 640 200)
)
(connector
(pt 592 184)
(pt 592 200)
)
(connector
(pt 592 200)
(pt 592 232)
)
(connector
(pt 688 200)
(pt 720 200)
)
(connector
(pt 512 480)
(pt 624 480)
)
(connector
(text "wait_m1" (rect 752 464 792 476)(font "Arial" ))
(pt 624 480)
(pt 800 480)
)
(connector
(text "wait_m1" (rect 377 1840 417 1852)(font "Arial" ))
(pt 376 1856)
(pt 688 1856)
(pt 376 1856)
)
(junction (pt 248 144))
(junction (pt 272 320))
(junction (pt 704 88))
(junction (pt 416 304))
(junction (pt 400 128))
(junction (pt 352 408))
3539,6 → 3632,8
(junction (pt 576 1232))
(junction (pt 328 1536))
(junction (pt 624 880))
(junction (pt 704 112))
(junction (pt 592 200))
(text "MREQ DURING REFRESH" (rect 640 248 780 262)(font "Arial" (font_size 8)))
(text "STANDARD MEM REQ" (rect 712 408 837 422)(font "Arial" (font_size 8)))
(text "Refresh generator logic, USPTO 4,332,008 by Shima et al. FIG. 9A" (rect 40 32 506 48)(font "Arial" (font_size 10))(border))
3556,7 → 3651,7
(section (rect 104 0 256 17)(text "MODULE" (rect 2 1 48 13)(font "Arial" ))(text "memory_ifc" (rect 43 2 123 17)(font "Arial" (font_size 9)(bold)))(border))
(section (rect 0 18 256 34)(text "DESIGNER" (rect 2 0 59 12)(font "Arial" ))(text "Goran Devic" (rect 56 2 135 17)(font "Arial" (font_size 9)))(border))
(section (rect 0 35 256 51)(text "DATE" (rect 2 0 30 12)(font "Arial" ))(text "November 1, 2014" (rect 56 3 159 17)(font "Arial" (font_size 8)))(border))
(section (rect 192 35 256 51)(text "REV" (rect 2 1 25 13)(font "Arial" ))(text "1.0" (rect 43 3 60 17)(font "Arial" (font_size 8)))(border))
(section (rect 192 35 256 51)(text "REV" (rect 2 1 25 13)(font "Arial" ))(text "1.1" (rect 43 3 60 17)(font "Arial" (font_size 8)))(border))
(drawing
)
)
/memory_ifc.bsf
117,15 → 117,15
(port
(pt 200 32)
(output)
(text "nM1_out" (rect 0 0 48 14)(font "Arial" (font_size 8)))
(text "nM1_out" (rect 131 27 179 41)(font "Arial" (font_size 8)))
(text "nRFSH_out" (rect 0 0 63 14)(font "Arial" (font_size 8)))
(text "nRFSH_out" (rect 116 27 179 41)(font "Arial" (font_size 8)))
(line (pt 200 32)(pt 184 32))
)
(port
(pt 200 48)
(output)
(text "nRFSH_out" (rect 0 0 63 14)(font "Arial" (font_size 8)))
(text "nRFSH_out" (rect 116 43 179 57)(font "Arial" (font_size 8)))
(text "nM1_out" (rect 0 0 48 14)(font "Arial" (font_size 8)))
(text "nM1_out" (rect 131 43 179 57)(font "Arial" (font_size 8)))
(line (pt 200 48)(pt 184 48))
)
(port
138,31 → 138,38
(port
(pt 200 80)
(output)
(text "nRD_out" (rect 0 0 48 14)(font "Arial" (font_size 8)))
(text "nRD_out" (rect 131 75 179 89)(font "Arial" (font_size 8)))
(text "wait_m1" (rect 0 0 48 14)(font "Arial" (font_size 8)))
(text "wait_m1" (rect 131 75 179 89)(font "Arial" (font_size 8)))
(line (pt 200 80)(pt 184 80))
)
(port
(pt 200 96)
(output)
(text "nWR_out" (rect 0 0 51 14)(font "Arial" (font_size 8)))
(text "nWR_out" (rect 128 91 179 105)(font "Arial" (font_size 8)))
(text "nRD_out" (rect 0 0 48 14)(font "Arial" (font_size 8)))
(text "nRD_out" (rect 131 91 179 105)(font "Arial" (font_size 8)))
(line (pt 200 96)(pt 184 96))
)
(port
(pt 200 112)
(output)
(text "nIORQ_out" (rect 0 0 61 14)(font "Arial" (font_size 8)))
(text "nIORQ_out" (rect 118 107 179 121)(font "Arial" (font_size 8)))
(text "nWR_out" (rect 0 0 51 14)(font "Arial" (font_size 8)))
(text "nWR_out" (rect 128 107 179 121)(font "Arial" (font_size 8)))
(line (pt 200 112)(pt 184 112))
)
(port
(pt 200 128)
(output)
(text "latch_wait" (rect 0 0 59 14)(font "Arial" (font_size 8)))
(text "latch_wait" (rect 120 123 179 137)(font "Arial" (font_size 8)))
(text "nIORQ_out" (rect 0 0 61 14)(font "Arial" (font_size 8)))
(text "nIORQ_out" (rect 118 123 179 137)(font "Arial" (font_size 8)))
(line (pt 200 128)(pt 184 128))
)
(port
(pt 200 144)
(output)
(text "latch_wait" (rect 0 0 59 14)(font "Arial" (font_size 8)))
(text "latch_wait" (rect 120 139 179 153)(font "Arial" (font_size 8)))
(line (pt 200 144)(pt 184 144))
)
(drawing
(rectangle (rect 16 16 184 240))
)
/memory_ifc.v
14,7 → 14,7
 
// PROGRAM "Quartus II 64-Bit"
// VERSION "Version 13.0.1 Build 232 06/12/2013 Service Pack 1 SJ Web Edition"
// CREATED "Sun Nov 16 21:11:14 2014"
// CREATED "Sun Dec 04 01:04:33 2016"
 
module memory_ifc(
clk,
36,7 → 36,8
nRD_out,
nWR_out,
nIORQ_out,
latch_wait
latch_wait,
wait_m1
);
 
 
60,6 → 61,7
output wire nWR_out;
output wire nIORQ_out;
output wire latch_wait;
output wire wait_m1;
 
wire intr_iorq;
wire ioRead;
74,22 → 76,23
reg q1;
reg q2;
reg wait_iorq;
reg wait_m1;
reg wait_m_ALTERA_SYNTHESIZED1;
reg wait_mrd;
reg wait_mwr;
wire SYNTHESIZED_WIRE_0;
reg DFFE_m1_ff3;
wire SYNTHESIZED_WIRE_1;
reg SYNTHESIZED_WIRE_15;
reg SYNTHESIZED_WIRE_16;
reg DFFE_iorq_ff4;
reg SYNTHESIZED_WIRE_16;
reg SYNTHESIZED_WIRE_17;
reg DFFE_mrd_ff3;
reg DFFE_intr_ff3;
wire SYNTHESIZED_WIRE_2;
reg SYNTHESIZED_WIRE_17;
reg SYNTHESIZED_WIRE_18;
wire SYNTHESIZED_WIRE_19;
wire SYNTHESIZED_WIRE_4;
wire SYNTHESIZED_WIRE_3;
reg SYNTHESIZED_WIRE_19;
wire SYNTHESIZED_WIRE_20;
wire SYNTHESIZED_WIRE_5;
reg DFFE_iorq_ff1;
reg DFFE_m1_ff1;
reg DFFE_mrd_ff1;
96,7 → 99,6
reg DFFE_mwr_ff1;
reg DFFE_mreq_ff2;
 
assign nM1_out = SYNTHESIZED_WIRE_18;
 
 
 
104,15 → 106,15
 
assign ioRead = iorq & fIORead;
 
assign SYNTHESIZED_WIRE_1 = ~(DFFE_m1_ff3 | wait_m1);
assign SYNTHESIZED_WIRE_1 = ~(DFFE_m1_ff3 | wait_m_ALTERA_SYNTHESIZED1);
 
assign m1_mreq = ~(in_intr | SYNTHESIZED_WIRE_1);
 
assign iorq = SYNTHESIZED_WIRE_15 | DFFE_iorq_ff4 | SYNTHESIZED_WIRE_16;
assign iorq = SYNTHESIZED_WIRE_16 | DFFE_iorq_ff4 | SYNTHESIZED_WIRE_17;
 
assign ioWrite = iorq & fIOWrite;
 
assign latch_wait = wait_mrd | wait_iorq | wait_m1 | wait_mwr;
assign latch_wait = wait_mrd | wait_iorq | wait_m_ALTERA_SYNTHESIZED1 | wait_mwr;
 
assign nMEMRQ_int = ~(m1_mreq | mrd_mreq | mwr_mreq);
 
126,16 → 128,18
 
assign nIORQ_out = ~(intr_iorq | iorq);
 
assign SYNTHESIZED_WIRE_4 = ~hold_clk_wait;
assign SYNTHESIZED_WIRE_5 = ~hold_clk_wait;
 
assign intr_iorq = DFFE_intr_ff3 | wait_iorq;
 
assign SYNTHESIZED_WIRE_0 = ~(SYNTHESIZED_WIRE_2 & SYNTHESIZED_WIRE_17);
assign nM1_out = SYNTHESIZED_WIRE_2 | SYNTHESIZED_WIRE_18;
 
assign SYNTHESIZED_WIRE_0 = ~(SYNTHESIZED_WIRE_3 & SYNTHESIZED_WIRE_19);
 
assign nRFSH_out = ~(nq2 & SYNTHESIZED_WIRE_18);
 
 
always@(posedge SYNTHESIZED_WIRE_19 or negedge nreset)
always@(posedge SYNTHESIZED_WIRE_20 or negedge nreset)
begin
if (!nreset)
begin
155,7 → 159,7
DFFE_intr_ff3 <= 0;
end
else
if (SYNTHESIZED_WIRE_4)
if (SYNTHESIZED_WIRE_5)
begin
DFFE_intr_ff3 <= wait_iorq;
end
180,31 → 184,31
begin
if (!nreset)
begin
SYNTHESIZED_WIRE_16 <= 0;
SYNTHESIZED_WIRE_17 <= 0;
end
else
if (timings_en)
begin
SYNTHESIZED_WIRE_16 <= DFFE_iorq_ff1;
SYNTHESIZED_WIRE_17 <= DFFE_iorq_ff1;
end
end
 
 
always@(posedge SYNTHESIZED_WIRE_19 or negedge nreset)
always@(posedge SYNTHESIZED_WIRE_20 or negedge nreset)
begin
if (!nreset)
begin
SYNTHESIZED_WIRE_15 <= 0;
SYNTHESIZED_WIRE_16 <= 0;
end
else
if (timings_en)
begin
SYNTHESIZED_WIRE_15 <= SYNTHESIZED_WIRE_16;
SYNTHESIZED_WIRE_16 <= SYNTHESIZED_WIRE_17;
end
end
 
 
always@(posedge SYNTHESIZED_WIRE_19 or negedge nreset)
always@(posedge SYNTHESIZED_WIRE_20 or negedge nreset)
begin
if (!nreset)
begin
213,7 → 217,7
else
if (timings_en)
begin
DFFE_iorq_ff4 <= SYNTHESIZED_WIRE_15;
DFFE_iorq_ff4 <= SYNTHESIZED_WIRE_16;
end
end
 
232,7 → 236,7
end
 
 
always@(posedge SYNTHESIZED_WIRE_19 or negedge nreset)
always@(posedge SYNTHESIZED_WIRE_20 or negedge nreset)
begin
if (!nreset)
begin
246,16 → 250,16
end
 
 
always@(posedge SYNTHESIZED_WIRE_19 or negedge nreset)
always@(posedge SYNTHESIZED_WIRE_20 or negedge nreset)
begin
if (!nreset)
begin
wait_m1 <= 0;
wait_m_ALTERA_SYNTHESIZED1 <= 0;
end
else
if (timings_en)
begin
wait_m1 <= DFFE_m1_ff1;
wait_m_ALTERA_SYNTHESIZED1 <= DFFE_m1_ff1;
end
end
 
269,7 → 273,7
else
if (timings_en)
begin
DFFE_m1_ff3 <= wait_m1;
DFFE_m1_ff3 <= wait_m_ALTERA_SYNTHESIZED1;
end
end
 
288,7 → 292,7
end
 
 
always@(posedge SYNTHESIZED_WIRE_19 or negedge nreset)
always@(posedge SYNTHESIZED_WIRE_20 or negedge nreset)
begin
if (!nreset)
begin
302,7 → 306,7
end
 
 
always@(posedge SYNTHESIZED_WIRE_19 or negedge nreset)
always@(posedge SYNTHESIZED_WIRE_20 or negedge nreset)
begin
if (!nreset)
begin
316,21 → 320,21
end
 
 
always@(posedge SYNTHESIZED_WIRE_19 or negedge nreset)
always@(posedge SYNTHESIZED_WIRE_20 or negedge nreset)
begin
if (!nreset)
begin
SYNTHESIZED_WIRE_17 <= 0;
SYNTHESIZED_WIRE_19 <= 0;
end
else
if (timings_en)
begin
SYNTHESIZED_WIRE_17 <= SYNTHESIZED_WIRE_18;
SYNTHESIZED_WIRE_19 <= SYNTHESIZED_WIRE_18;
end
end
 
 
always@(posedge SYNTHESIZED_WIRE_19 or negedge nreset)
always@(posedge SYNTHESIZED_WIRE_20 or negedge nreset)
begin
if (!nreset)
begin
339,7 → 343,7
else
if (timings_en)
begin
DFFE_mreq_ff2 <= SYNTHESIZED_WIRE_17;
DFFE_mreq_ff2 <= SYNTHESIZED_WIRE_19;
end
end
 
358,7 → 362,7
end
 
 
always@(posedge SYNTHESIZED_WIRE_19 or negedge nreset)
always@(posedge SYNTHESIZED_WIRE_20 or negedge nreset)
begin
if (!nreset)
begin
372,7 → 376,7
end
 
 
always@(posedge SYNTHESIZED_WIRE_19 or negedge nreset)
always@(posedge SYNTHESIZED_WIRE_20 or negedge nreset)
begin
if (!nreset)
begin
385,13 → 389,15
end
end
 
assign SYNTHESIZED_WIRE_19 = ~clk;
assign SYNTHESIZED_WIRE_20 = ~clk;
 
assign nq2 = ~q2;
 
assign SYNTHESIZED_WIRE_2 = ~DFFE_mreq_ff2;
assign SYNTHESIZED_WIRE_2 = ~nreset;
 
assign SYNTHESIZED_WIRE_3 = ~DFFE_mreq_ff2;
 
 
always@(posedge clk or negedge nreset)
begin
if (!nreset)
419,5 → 425,6
end
end
 
assign wait_m1 = wait_m_ALTERA_SYNTHESIZED1;
 
endmodule
/resets.bdf
100,6 → 100,22
(text "VCC" (rect 136 7 156 17)(font "Arial" (font_size 6)))
)
(pin
(input)
(rect 32 640 208 656)
(text "INPUT" (rect 133 0 161 10)(font "Arial" (font_size 6)))
(text "hold_clk_wait" (rect 9 0 73 12)(font "Arial" ))
(pt 176 8)
(drawing
(line (pt 92 12)(pt 117 12))
(line (pt 92 4)(pt 117 4))
(line (pt 121 8)(pt 176 8))
(line (pt 92 12)(pt 92 4))
(line (pt 117 4)(pt 121 8))
(line (pt 117 12)(pt 121 8))
)
(text "VCC" (rect 136 7 156 17)(font "Arial" (font_size 6)))
)
(pin
(output)
(rect 776 488 952 504)
(text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6)))
146,7 → 162,7
(pt 48 16)
(output)
(text "OUT" (rect 32 7 49 19)(font "Courier New" (bold))(invisible))
(text "OUT" (rect 32 7 49 19)(font "Courier New" (bold))(invisible))
(text "OUT" (rect 32 7 46 19)(font "Courier New" (bold))(invisible))
(line (pt 39 16)(pt 48 16))
)
(drawing
178,7 → 194,7
(pt 64 24)
(output)
(text "OUT" (rect 48 15 65 27)(font "Courier New" (bold))(invisible))
(text "OUT" (rect 48 15 65 27)(font "Courier New" (bold))(invisible))
(text "OUT" (rect 48 15 62 27)(font "Courier New" (bold))(invisible))
(line (pt 42 24)(pt 64 24))
)
(drawing
210,7 → 226,7
(pt 64 24)
(output)
(text "OUT" (rect 48 15 65 27)(font "Courier New" (bold))(invisible))
(text "OUT" (rect 48 15 65 27)(font "Courier New" (bold))(invisible))
(text "OUT" (rect 48 15 62 27)(font "Courier New" (bold))(invisible))
(line (pt 42 24)(pt 64 24))
)
(drawing
235,7 → 251,7
(pt 48 16)
(output)
(text "OUT" (rect 32 7 49 19)(font "Courier New" (bold))(invisible))
(text "OUT" (rect 32 7 49 19)(font "Courier New" (bold))(invisible))
(text "OUT" (rect 32 7 46 19)(font "Courier New" (bold))(invisible))
(line (pt 39 16)(pt 48 16))
)
(drawing
267,7 → 283,7
(pt 64 24)
(output)
(text "OUT" (rect 48 15 65 27)(font "Courier New" (bold))(invisible))
(text "OUT" (rect 48 15 65 27)(font "Courier New" (bold))(invisible))
(text "OUT" (rect 48 15 62 27)(font "Courier New" (bold))(invisible))
(line (pt 42 24)(pt 64 24))
)
(drawing
320,7 → 336,7
(pt 64 24)
(output)
(text "Q" (rect 45 20 50 32)(font "Courier New" (bold)))
(text "Q" (rect 43 20 48 32)(font "Courier New" (bold)))
(text "Q" (rect 43 20 47 32)(font "Courier New" (bold)))
(line (pt 52 24)(pt 64 24))
)
(drawing
349,7 → 365,7
(pt 48 16)
(output)
(text "OUT" (rect 32 7 49 19)(font "Courier New" (bold))(invisible))
(text "OUT" (rect 32 7 49 19)(font "Courier New" (bold))(invisible))
(text "OUT" (rect 32 7 46 19)(font "Courier New" (bold))(invisible))
(line (pt 39 16)(pt 48 16))
)
(drawing
402,7 → 418,7
(pt 64 24)
(output)
(text "Q" (rect 45 20 50 32)(font "Courier New" (bold)))
(text "Q" (rect 43 20 48 32)(font "Courier New" (bold)))
(text "Q" (rect 43 20 47 32)(font "Courier New" (bold)))
(line (pt 52 24)(pt 64 24))
)
(drawing
432,7 → 448,7
(pt 48 16)
(output)
(text "OUT" (rect 32 7 49 19)(font "Courier New" (bold))(invisible))
(text "OUT" (rect 32 7 49 19)(font "Courier New" (bold))(invisible))
(text "OUT" (rect 32 7 46 19)(font "Courier New" (bold))(invisible))
(line (pt 39 16)(pt 48 16))
)
(drawing
478,7 → 494,7
(pt 64 24)
(output)
(text "Q" (rect 45 20 50 32)(font "Courier New" (bold)))
(text "Q" (rect 43 20 48 32)(font "Courier New" (bold)))
(text "Q" (rect 43 20 47 32)(font "Courier New" (bold)))
(line (pt 52 24)(pt 64 24))
)
(drawing
507,7 → 523,7
(pt 16 0)
(output)
(text "OUT" (rect 32 7 49 19)(font "Courier New" (bold))(invisible))
(text "OUT" (rect 7 2 19 19)(font "Courier New" (bold))(vertical)(invisible))
(text "OUT" (rect 7 2 19 16)(font "Courier New" (bold))(vertical)(invisible))
(line (pt 16 9)(pt 16 0))
)
(drawing
519,60 → 535,66
(rotate90)
)
(symbol
(rect 296 520 360 600)
(text "DFF" (rect 1 0 19 10)(font "Arial" (font_size 6)))
(text "res1" (rect 3 68 24 80)(font "Arial" ))
(rect 680 456 744 536)
(text "OR4" (rect 1 0 19 10)(font "Arial" (font_size 6)))
(text "inst" (rect 3 69 20 81)(font "Arial" ))
(port
(pt 32 80)
(pt 0 16)
(input)
(text "CLRN" (rect 21 59 44 71)(font "Courier New" (bold)))
(text "CLRN" (rect 21 58 44 70)(font "Courier New" (bold)))
(line (pt 32 80)(pt 32 76))
(text "IN1" (rect 2 7 19 19)(font "Courier New" (bold))(invisible))
(text "IN1" (rect 2 7 19 19)(font "Courier New" (bold))(invisible))
(line (pt 0 16)(pt 13 16))
)
(port
(pt 0 40)
(pt 0 48)
(input)
(text "CLK" (rect 3 29 20 41)(font "Courier New" (bold))(invisible))
(text "CLK" (rect 3 29 20 41)(font "Courier New" (bold))(invisible))
(line (pt 0 40)(pt 12 40))
(text "IN3" (rect 2 39 19 51)(font "Courier New" (bold))(invisible))
(text "IN3" (rect 2 39 19 51)(font "Courier New" (bold))(invisible))
(line (pt 0 48)(pt 15 48))
)
(port
(pt 0 24)
(pt 0 64)
(input)
(text "D" (rect 14 20 19 32)(font "Courier New" (bold)))
(text "D" (rect 14 20 19 32)(font "Courier New" (bold)))
(line (pt 0 24)(pt 12 24))
(text "IN4" (rect 2 55 19 67)(font "Courier New" (bold))(invisible))
(text "IN4" (rect 2 55 19 67)(font "Courier New" (bold))(invisible))
(line (pt 0 64)(pt 13 64))
)
(port
(pt 32 0)
(pt 0 32)
(input)
(text "PRN" (rect 24 13 41 25)(font "Courier New" (bold)))
(text "PRN" (rect 24 11 41 23)(font "Courier New" (bold)))
(line (pt 32 4)(pt 32 0))
(text "IN2" (rect 2 23 19 35)(font "Courier New" (bold))(invisible))
(text "IN2" (rect 2 23 19 35)(font "Courier New" (bold))(invisible))
(line (pt 0 32)(pt 15 32))
)
(port
(pt 64 24)
(pt 64 40)
(output)
(text "Q" (rect 45 20 50 32)(font "Courier New" (bold)))
(text "Q" (rect 43 20 48 32)(font "Courier New" (bold)))
(line (pt 52 24)(pt 64 24))
(text "OUT" (rect 48 31 65 43)(font "Courier New" (bold))(invisible))
(text "OUT" (rect 48 31 62 43)(font "Courier New" (bold))(invisible))
(line (pt 48 40)(pt 64 40))
)
(drawing
(line (pt 12 12)(pt 52 12))
(line (pt 12 68)(pt 52 68))
(line (pt 52 68)(pt 52 12))
(line (pt 12 68)(pt 12 12))
(line (pt 19 40)(pt 12 47))
(line (pt 12 32)(pt 20 40))
(circle (rect 28 4 36 12))
(circle (rect 28 68 36 76))
(line (pt 13 67)(pt 13 51))
(line (pt 25 52)(pt 13 52))
(line (pt 13 12)(pt 13 29))
(line (pt 13 29)(pt 25 29))
(arc (pt 7 45)(pt 7 35)(rect -14 24 19 57))
(arc (pt 49 40)(pt 25 29)(rect -6 29 57 92))
(arc (pt 25 51)(pt 49 40)(rect -6 -11 57 52))
)
)
(symbol
(rect 408 520 472 600)
(text "DFF" (rect 1 0 19 10)(font "Arial" (font_size 6)))
(text "res2" (rect 3 68 24 80)(font "Arial" ))
(rect 520 520 584 600)
(text "DFFE" (rect 1 0 25 10)(font "Arial" (font_size 6)))
(text "intr_ff3" (rect 3 68 39 80)(font "Arial" ))
(port
(pt 32 0)
(input)
(text "PRN" (rect 24 13 41 25)(font "Courier New" (bold)))
(text "PRN" (rect 24 11 41 23)(font "Courier New" (bold)))
(line (pt 32 4)(pt 32 0))
)
(port
(pt 32 80)
(input)
(text "CLRN" (rect 21 59 44 71)(font "Courier New" (bold)))
580,13 → 602,6
(line (pt 32 80)(pt 32 76))
)
(port
(pt 0 40)
(input)
(text "CLK" (rect 3 29 20 41)(font "Courier New" (bold))(invisible))
(text "CLK" (rect 3 29 20 41)(font "Courier New" (bold))(invisible))
(line (pt 0 40)(pt 12 40))
)
(port
(pt 0 24)
(input)
(text "D" (rect 14 20 19 32)(font "Courier New" (bold)))
594,35 → 609,74
(line (pt 0 24)(pt 12 24))
)
(port
(pt 32 0)
(pt 0 40)
(input)
(text "PRN" (rect 24 13 41 25)(font "Courier New" (bold)))
(text "PRN" (rect 24 11 41 23)(font "Courier New" (bold)))
(line (pt 32 4)(pt 32 0))
(text "CLK" (rect 2 28 19 40)(font "Courier New" (bold))(invisible))
(text "CLK" (rect 2 28 19 40)(font "Courier New" (bold))(invisible))
(line (pt 0 40)(pt 12 40))
)
(port
(pt 0 56)
(input)
(text "ENA" (rect 14 50 31 62)(font "Courier New" (bold)))
(text "ENA" (rect 14 50 31 62)(font "Courier New" (bold)))
(line (pt 0 56)(pt 12 56))
)
(port
(pt 64 24)
(output)
(text "Q" (rect 45 20 50 32)(font "Courier New" (bold)))
(text "Q" (rect 43 20 48 32)(font "Courier New" (bold)))
(line (pt 52 24)(pt 64 24))
(text "Q" (rect 44 20 49 32)(font "Courier New" (bold)))
(text "Q" (rect 44 20 48 32)(font "Courier New" (bold)))
(line (pt 53 24)(pt 64 24))
)
(drawing
(line (pt 12 68)(pt 52 68))
(line (pt 12 12)(pt 52 12))
(line (pt 12 68)(pt 52 68))
(line (pt 52 68)(pt 52 12))
(line (pt 12 68)(pt 12 12))
(line (pt 19 40)(pt 12 47))
(line (pt 12 32)(pt 20 40))
(line (pt 12 34)(pt 19 41))
(line (pt 18 41)(pt 12 47))
(circle (rect 28 4 36 12))
(circle (rect 28 68 36 76))
)
)
(symbol
(rect 520 520 584 600)
(text "DFF" (rect 1 0 19 10)(font "Arial" (font_size 6)))
(text "res3" (rect 3 68 24 80)(font "Arial" ))
(rect 216 632 264 664)
(text "NOT" (rect 1 0 21 10)(font "Arial" (font_size 6)))
(text "inst4" (rect 3 21 26 33)(font "Arial" ))
(port
(pt 0 16)
(input)
(text "IN" (rect 2 7 13 19)(font "Courier New" (bold))(invisible))
(text "IN" (rect 2 7 13 19)(font "Courier New" (bold))(invisible))
(line (pt 0 16)(pt 13 16))
)
(port
(pt 48 16)
(output)
(text "OUT" (rect 32 7 49 19)(font "Courier New" (bold))(invisible))
(text "OUT" (rect 32 7 46 19)(font "Courier New" (bold))(invisible))
(line (pt 39 16)(pt 48 16))
)
(drawing
(line (pt 13 25)(pt 13 7))
(line (pt 13 7)(pt 31 16))
(line (pt 13 25)(pt 31 16))
(circle (rect 31 12 39 20))
)
)
(symbol
(rect 296 520 360 600)
(text "DFFE" (rect 1 0 25 10)(font "Arial" (font_size 6)))
(text "intr_ff4" (rect 3 68 39 80)(font "Arial" ))
(port
(pt 32 0)
(input)
(text "PRN" (rect 24 13 41 25)(font "Courier New" (bold)))
(text "PRN" (rect 24 11 41 23)(font "Courier New" (bold)))
(line (pt 32 4)(pt 32 0))
)
(port
(pt 32 80)
(input)
(text "CLRN" (rect 21 59 44 71)(font "Courier New" (bold)))
630,13 → 684,6
(line (pt 32 80)(pt 32 76))
)
(port
(pt 0 40)
(input)
(text "CLK" (rect 3 29 20 41)(font "Courier New" (bold))(invisible))
(text "CLK" (rect 3 29 20 41)(font "Courier New" (bold))(invisible))
(line (pt 0 40)(pt 12 40))
)
(port
(pt 0 24)
(input)
(text "D" (rect 14 20 19 32)(font "Courier New" (bold)))
644,77 → 691,92
(line (pt 0 24)(pt 12 24))
)
(port
(pt 32 0)
(pt 0 40)
(input)
(text "PRN" (rect 24 13 41 25)(font "Courier New" (bold)))
(text "PRN" (rect 24 11 41 23)(font "Courier New" (bold)))
(line (pt 32 4)(pt 32 0))
(text "CLK" (rect 2 28 19 40)(font "Courier New" (bold))(invisible))
(text "CLK" (rect 2 28 19 40)(font "Courier New" (bold))(invisible))
(line (pt 0 40)(pt 12 40))
)
(port
(pt 0 56)
(input)
(text "ENA" (rect 14 50 31 62)(font "Courier New" (bold)))
(text "ENA" (rect 14 50 31 62)(font "Courier New" (bold)))
(line (pt 0 56)(pt 12 56))
)
(port
(pt 64 24)
(output)
(text "Q" (rect 45 20 50 32)(font "Courier New" (bold)))
(text "Q" (rect 43 20 48 32)(font "Courier New" (bold)))
(line (pt 52 24)(pt 64 24))
(text "Q" (rect 44 20 49 32)(font "Courier New" (bold)))
(text "Q" (rect 44 20 48 32)(font "Courier New" (bold)))
(line (pt 53 24)(pt 64 24))
)
(drawing
(line (pt 12 68)(pt 52 68))
(line (pt 12 12)(pt 52 12))
(line (pt 12 68)(pt 52 68))
(line (pt 52 68)(pt 52 12))
(line (pt 12 68)(pt 12 12))
(line (pt 19 40)(pt 12 47))
(line (pt 12 32)(pt 20 40))
(line (pt 12 34)(pt 19 41))
(line (pt 18 41)(pt 12 47))
(circle (rect 28 4 36 12))
(circle (rect 28 68 36 76))
)
)
(symbol
(rect 680 456 744 536)
(text "OR4" (rect 1 0 19 10)(font "Arial" (font_size 6)))
(text "inst" (rect 3 69 20 81)(font "Arial" ))
(rect 408 520 472 600)
(text "DFFE" (rect 1 0 25 10)(font "Arial" (font_size 6)))
(text "intr_ff5" (rect 3 68 39 80)(font "Arial" ))
(port
(pt 0 16)
(pt 32 0)
(input)
(text "IN1" (rect 2 7 19 19)(font "Courier New" (bold))(invisible))
(text "IN1" (rect 2 7 19 19)(font "Courier New" (bold))(invisible))
(line (pt 0 16)(pt 13 16))
(text "PRN" (rect 24 13 41 25)(font "Courier New" (bold)))
(text "PRN" (rect 24 11 41 23)(font "Courier New" (bold)))
(line (pt 32 4)(pt 32 0))
)
(port
(pt 0 48)
(pt 32 80)
(input)
(text "IN3" (rect 2 39 19 51)(font "Courier New" (bold))(invisible))
(text "IN3" (rect 2 39 19 51)(font "Courier New" (bold))(invisible))
(line (pt 0 48)(pt 15 48))
(text "CLRN" (rect 21 59 44 71)(font "Courier New" (bold)))
(text "CLRN" (rect 21 58 44 70)(font "Courier New" (bold)))
(line (pt 32 80)(pt 32 76))
)
(port
(pt 0 64)
(pt 0 24)
(input)
(text "IN4" (rect 2 55 19 67)(font "Courier New" (bold))(invisible))
(text "IN4" (rect 2 55 19 67)(font "Courier New" (bold))(invisible))
(line (pt 0 64)(pt 13 64))
(text "D" (rect 14 20 19 32)(font "Courier New" (bold)))
(text "D" (rect 14 20 19 32)(font "Courier New" (bold)))
(line (pt 0 24)(pt 12 24))
)
(port
(pt 0 32)
(pt 0 40)
(input)
(text "IN2" (rect 2 23 19 35)(font "Courier New" (bold))(invisible))
(text "IN2" (rect 2 23 19 35)(font "Courier New" (bold))(invisible))
(line (pt 0 32)(pt 15 32))
(text "CLK" (rect 2 28 19 40)(font "Courier New" (bold))(invisible))
(text "CLK" (rect 2 28 19 40)(font "Courier New" (bold))(invisible))
(line (pt 0 40)(pt 12 40))
)
(port
(pt 64 40)
(pt 0 56)
(input)
(text "ENA" (rect 14 50 31 62)(font "Courier New" (bold)))
(text "ENA" (rect 14 50 31 62)(font "Courier New" (bold)))
(line (pt 0 56)(pt 12 56))
)
(port
(pt 64 24)
(output)
(text "OUT" (rect 48 31 65 43)(font "Courier New" (bold))(invisible))
(text "OUT" (rect 48 31 65 43)(font "Courier New" (bold))(invisible))
(line (pt 48 40)(pt 64 40))
(text "Q" (rect 44 20 49 32)(font "Courier New" (bold)))
(text "Q" (rect 44 20 48 32)(font "Courier New" (bold)))
(line (pt 53 24)(pt 64 24))
)
(drawing
(line (pt 13 67)(pt 13 51))
(line (pt 25 52)(pt 13 52))
(line (pt 13 12)(pt 13 29))
(line (pt 13 29)(pt 25 29))
(arc (pt 7 45)(pt 7 35)(rect -14 24 19 57))
(arc (pt 49 40)(pt 25 29)(rect -6 29 57 92))
(arc (pt 25 51)(pt 49 40)(rect -6 -11 57 52))
(line (pt 12 68)(pt 52 68))
(line (pt 12 12)(pt 52 12))
(line (pt 52 68)(pt 52 12))
(line (pt 12 68)(pt 12 12))
(line (pt 12 34)(pt 19 41))
(line (pt 18 41)(pt 12 47))
(circle (rect 28 4 36 12))
(circle (rect 28 68 36 76))
)
)
(connector
907,106 → 969,146
(pt 624 544)
)
(connector
(pt 680 504)
(pt 496 504)
(text "clrpc_int" (rect 630 456 671 468)(font "Arial" ))
(pt 680 472)
(pt 624 472)
)
(connector
(pt 496 504)
(pt 496 544)
(pt 744 496)
(pt 776 496)
)
(connector
(pt 472 544)
(pt 496 544)
(pt 712 296)
(pt 712 336)
)
(connector
(pt 496 544)
(pt 520 544)
(pt 712 336)
(pt 712 424)
)
(connector
(pt 232 320)
(pt 232 352)
)
(connector
(pt 208 648)
(pt 216 648)
)
(connector
(pt 296 560)
(pt 264 560)
)
(connector
(pt 264 616)
(pt 264 560)
)
(connector
(text "nclk" (rect 216 600 236 612)(font "Arial" ))
(pt 208 616)
(pt 264 616)
)
(connector
(pt 712 424)
(pt 264 424)
)
(connector
(pt 264 424)
(pt 264 544)
)
(connector
(pt 296 544)
(pt 264 544)
)
(connector
(pt 408 560)
(pt 376 560)
)
(connector
(pt 376 616)
(pt 376 560)
)
(connector
(pt 680 488)
(pt 384 488)
(pt 376 488)
)
(connector
(pt 384 488)
(pt 384 544)
(pt 376 544)
(pt 376 488)
)
(connector
(pt 360 544)
(pt 384 544)
(pt 376 544)
)
(connector
(pt 384 544)
(pt 376 544)
(pt 408 544)
)
(connector
(text "clrpc_int" (rect 630 456 671 468)(font "Arial" ))
(pt 680 472)
(pt 624 472)
(pt 520 560)
(pt 488 560)
)
(connector
(pt 744 496)
(pt 776 496)
(pt 488 560)
(pt 488 616)
)
(connector
(pt 712 296)
(pt 712 336)
(pt 264 616)
(pt 376 616)
)
(connector
(pt 712 336)
(pt 712 424)
(pt 376 616)
(pt 488 616)
)
(connector
(pt 712 424)
(pt 272 424)
(pt 680 504)
(pt 488 504)
)
(connector
(pt 272 424)
(pt 272 544)
(pt 488 544)
(pt 488 504)
)
(connector
(pt 296 544)
(pt 272 544)
(pt 472 544)
(pt 488 544)
)
(connector
(pt 520 560)
(pt 496 560)
(pt 488 544)
(pt 520 544)
)
(connector
(pt 496 560)
(pt 496 616)
(pt 504 648)
(pt 504 576)
)
(connector
(pt 232 320)
(pt 232 352)
(pt 520 576)
(pt 504 576)
)
(connector
(pt 408 560)
(pt 384 560)
(pt 408 576)
(pt 392 576)
)
(connector
(pt 384 560)
(pt 384 616)
(pt 392 576)
(pt 392 648)
)
(connector
(pt 496 616)
(pt 384 616)
(pt 392 648)
(pt 504 648)
)
(connector
(pt 296 560)
(pt 272 560)
(pt 296 576)
(pt 280 576)
)
(connector
(pt 272 560)
(pt 272 616)
(pt 280 576)
(pt 280 648)
)
(connector
(pt 272 616)
(pt 384 616)
(pt 264 648)
(pt 280 648)
)
(connector
(text "nclk" (rect 216 600 236 612)(font "Arial" ))
(pt 208 616)
(pt 272 616)
(pt 280 648)
(pt 392 648)
)
(junction (pt 232 144))
(junction (pt 368 96))
1016,11 → 1118,13
(junction (pt 320 320))
(junction (pt 232 352))
(junction (pt 712 224))
(junction (pt 496 544))
(junction (pt 384 544))
(junction (pt 712 336))
(junction (pt 384 616))
(junction (pt 272 616))
(junction (pt 264 616))
(junction (pt 376 616))
(junction (pt 376 544))
(junction (pt 488 544))
(junction (pt 392 648))
(junction (pt 280 648))
(text "Needed only for FPGAs" (rect 40 72 174 86)(font "Arial" (font_size 8)))
(text "Special reset, USPTO 4,486,827 by Shima et al." (rect 40 24 371 40)(font "Arial" (font_size 10))(border))
(text "Required 3 clock reset cycles to clear PC and IR" (rect 304 464 576 478)(font "Arial" (font_size 8)))
1033,7 → 1137,7
(section (rect 0 18 256 34)(text "DESIGNER" (rect 2 0 59 12)(font "Arial" ))(text "Goran Devic" (rect 56 2 135 17)(font "Arial" (font_size 9)))(border))
(section (rect 104 0 256 17)(text "MODULE" (rect 2 1 48 13)(font "Arial" ))(text "resets" (rect 43 2 86 17)(font "Arial" (font_size 9)(bold)))(border))
(section (rect 0 0 256 17)(text "PROJECT" (rect 2 0 52 12)(font "Arial" ))(text "A-Z80" (rect 56 2 94 17)(font "Arial" (font_size 9)(bold)))(border))
(section (rect 192 35 256 51)(text "REV" (rect 2 1 25 13)(font "Arial" ))(text "1.3" (rect 43 3 60 17)(font "Arial" (font_size 8)))(border))
(section (rect 192 35 256 51)(text "REV" (rect 2 1 25 13)(font "Arial" ))(text "1.4" (rect 43 3 60 17)(font "Arial" (font_size 8)))(border))
(drawing
)
)
/resets.bsf
20,9 → 20,9
*/
(header "symbol" (version "1.2"))
(symbol
(rect 16 16 168 144)
(rect 16 16 184 176)
(text "resets" (rect 5 0 41 14)(font "Arial" (font_size 8)))
(text "inst" (rect 8 112 25 124)(font "Arial" ))
(text "inst" (rect 8 144 25 156)(font "Arial" ))
(port
(pt 0 32)
(input)
59,20 → 59,27
(line (pt 0 96)(pt 16 96))
)
(port
(pt 152 32)
(output)
(text "clrpc" (rect 0 0 28 14)(font "Arial" (font_size 8)))
(text "clrpc" (rect 103 27 131 41)(font "Arial" (font_size 8)))
(line (pt 152 32)(pt 136 32))
(pt 0 112)
(input)
(text "hold_clk_wait" (rect 0 0 77 14)(font "Arial" (font_size 8)))
(text "hold_clk_wait" (rect 21 107 98 121)(font "Arial" (font_size 8)))
(line (pt 0 112)(pt 16 112))
)
(port
(pt 152 48)
(pt 168 32)
(output)
(text "nreset" (rect 0 0 36 14)(font "Arial" (font_size 8)))
(text "nreset" (rect 95 43 131 57)(font "Arial" (font_size 8)))
(line (pt 152 48)(pt 136 48))
(text "nreset" (rect 111 27 147 41)(font "Arial" (font_size 8)))
(line (pt 168 32)(pt 152 32))
)
(port
(pt 168 48)
(output)
(text "clrpc" (rect 0 0 28 14)(font "Arial" (font_size 8)))
(text "clrpc" (rect 119 43 147 57)(font "Arial" (font_size 8)))
(line (pt 168 48)(pt 152 48))
)
(drawing
(rectangle (rect 16 16 136 112))
(rectangle (rect 16 16 152 144))
)
)
/resets.v
14,7 → 14,7
 
// PROGRAM "Quartus II 64-Bit"
// VERSION "Version 13.0.1 Build 232 06/12/2013 Service Pack 1 SJ Web Edition"
// CREATED "Sat Feb 27 08:32:59 2016"
// CREATED "Thu Dec 08 21:08:44 2016"
 
module resets(
reset_in,
22,6 → 22,7
M1,
T2,
fpga_reset,
hold_clk_wait,
clrpc,
nreset
);
32,6 → 33,7
input wire M1;
input wire T2;
input wire fpga_reset;
input wire hold_clk_wait;
output wire clrpc;
output wire nreset;
 
40,24 → 42,25
reg x1;
wire x2;
wire x3;
wire SYNTHESIZED_WIRE_8;
wire SYNTHESIZED_WIRE_11;
wire SYNTHESIZED_WIRE_1;
reg SYNTHESIZED_WIRE_9;
reg DFF_res3;
reg SYNTHESIZED_WIRE_10;
wire SYNTHESIZED_WIRE_11;
reg SYNTHESIZED_WIRE_12;
reg DFFE_intr_ff3;
reg SYNTHESIZED_WIRE_13;
wire SYNTHESIZED_WIRE_14;
wire SYNTHESIZED_WIRE_3;
reg SYNTHESIZED_WIRE_12;
wire SYNTHESIZED_WIRE_6;
reg SYNTHESIZED_WIRE_15;
wire SYNTHESIZED_WIRE_16;
wire SYNTHESIZED_WIRE_9;
 
assign nreset = SYNTHESIZED_WIRE_6;
assign nreset = SYNTHESIZED_WIRE_9;
 
 
 
 
always@(posedge nclk or negedge SYNTHESIZED_WIRE_8)
always@(posedge nclk or negedge SYNTHESIZED_WIRE_11)
begin
if (!SYNTHESIZED_WIRE_8)
if (!SYNTHESIZED_WIRE_11)
begin
x1 <= 1;
end
67,42 → 70,41
end
end
 
assign clrpc = clrpc_int | SYNTHESIZED_WIRE_9 | DFF_res3 | SYNTHESIZED_WIRE_10;
assign clrpc = clrpc_int | SYNTHESIZED_WIRE_12 | DFFE_intr_ff3 | SYNTHESIZED_WIRE_13;
 
assign SYNTHESIZED_WIRE_1 = ~reset_in;
 
assign x2 = x1 & SYNTHESIZED_WIRE_11;
assign x2 = x1 & SYNTHESIZED_WIRE_14;
 
assign SYNTHESIZED_WIRE_11 = M1 & T2;
assign SYNTHESIZED_WIRE_14 = M1 & T2;
 
assign x3 = x1 & SYNTHESIZED_WIRE_3;
 
assign SYNTHESIZED_WIRE_6 = ~SYNTHESIZED_WIRE_12;
assign SYNTHESIZED_WIRE_9 = ~SYNTHESIZED_WIRE_15;
 
assign SYNTHESIZED_WIRE_3 = ~SYNTHESIZED_WIRE_11;
assign SYNTHESIZED_WIRE_16 = ~hold_clk_wait;
 
assign SYNTHESIZED_WIRE_3 = ~SYNTHESIZED_WIRE_14;
 
assign nclk = ~clk;
 
assign SYNTHESIZED_WIRE_8 = ~fpga_reset;
assign SYNTHESIZED_WIRE_11 = ~fpga_reset;
 
 
always@(posedge clk or negedge SYNTHESIZED_WIRE_8)
always@(posedge nclk)
begin
if (!SYNTHESIZED_WIRE_8)
if (SYNTHESIZED_WIRE_16)
begin
SYNTHESIZED_WIRE_12 <= 1;
DFFE_intr_ff3 <= SYNTHESIZED_WIRE_12;
end
else
begin
SYNTHESIZED_WIRE_12 <= x3;
end
end
 
 
always@(posedge nclk)
begin
if (SYNTHESIZED_WIRE_16)
begin
SYNTHESIZED_WIRE_10 <= SYNTHESIZED_WIRE_12;
SYNTHESIZED_WIRE_13 <= SYNTHESIZED_WIRE_15;
end
end
 
109,29 → 111,35
 
always@(posedge nclk)
begin
if (SYNTHESIZED_WIRE_16)
begin
SYNTHESIZED_WIRE_9 <= SYNTHESIZED_WIRE_10;
SYNTHESIZED_WIRE_12 <= SYNTHESIZED_WIRE_13;
end
end
 
 
always@(posedge nclk)
always@(posedge clk or negedge SYNTHESIZED_WIRE_11)
begin
if (!SYNTHESIZED_WIRE_11)
begin
DFF_res3 <= SYNTHESIZED_WIRE_9;
SYNTHESIZED_WIRE_15 <= 1;
end
else
begin
SYNTHESIZED_WIRE_15 <= x3;
end
end
 
 
always@(posedge nclk or negedge SYNTHESIZED_WIRE_6)
always@(posedge nclk or negedge SYNTHESIZED_WIRE_9)
begin
if (!SYNTHESIZED_WIRE_6)
if (!SYNTHESIZED_WIRE_9)
begin
clrpc_int <= 0;
end
else
begin
clrpc_int <= ~clrpc_int & x2 | clrpc_int & ~SYNTHESIZED_WIRE_11;
clrpc_int <= ~clrpc_int & x2 | clrpc_int & ~SYNTHESIZED_WIRE_14;
end
end
 
/simulation/modelsim/wave_reset.do
6,6 → 6,7
add wave -noupdate /test_reset/M1
add wave -noupdate /test_reset/T2
add wave -noupdate -color Gold /test_reset/clrpc
add wave -noupdate /test_reset/reset_block/hold_clk_wait
add wave -noupdate /test_reset/nreset
add wave -noupdate -color {Cadet Blue} /test_reset/reset_block/x1
add wave -noupdate -color {Cadet Blue} /test_reset/reset_block/x2
/test_reset.sv
23,8 → 23,11
logic T2 = 0;
 
wire clrpc; // Load 0 to PC
wire hold_clk_wait; // Hold clrpc
wire nreset; // Internal inverted reset signal
 
assign hold_clk_wait = 0; // Will not test this case
 
// ----------------- TEST -------------------
initial begin
// Test normal reset sequence - 3 clocks long
/timing_macros.i
323,11 → 323,11
 
WZ=IX+d ixy_d=1; // Compute WZ=IX+d
IX_IY ctl_state_ixiy_we=1; ctl_state_iy_set=op5; setIXIY=1; // IX/IY prefix
CLR_IX_IY ctl_state_ixiy_we=1; ctl_state_ixiy_clr=~setIXIY; // Clear IX/IY flag
CLR_IX_IY ctl_state_ixiy_we=1; ctl_state_ixiy_clr=~setIXIY; // Clear IX/IY flag if not explicitly set
 
CB ctl_state_tbl_cb_set=1; setCBED=1; // CB-table prefix
ED ctl_state_tbl_ed_set=1; setCBED=1; // ED-table prefix
CLR_CB_ED ctl_state_tbl_clr=~setCBED; // Clear CB/ED prefix
CB ctl_state_tbl_we=1; ctl_state_tbl_cb_set=1; // CB-table prefix
ED ctl_state_tbl_we=1; ctl_state_tbl_ed_set=1; // ED-table prefix
CLR_CB_ED ctl_state_tbl_we=1; // Clear CB/ED prefix if not explicitly set
 
// If the NF is set, complement HF and CF on the way out to the bus
// This is used to correctly set those flags after subtraction operations

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.