Add original-firmware Sound & Speech, four configurable Multi-Pak sockets, bounded per-slot ROM allocation and a nine-page menu organized around devices and media. Repair inherited clock/reset/CPU-memory/video paths and add explicit conditional external-I/O timing contracts. Preserve native Main startup-file ordering, saved layouts, stock-core separation and the coco3plus media profile. Provide native Windows tool downloads, pinned ToolShed ROM assembly, fresh Quartus builds, functional and fitted timing checks, reviewed release packaging and passwordless SSH installation with backups. Retain original component notices, document contribution copyright and keep SSC ROM inputs outside Git. Validation: Quartus17.0.2 Build602 seed5, zero errors; 15 functional jobs, 368 both-corner timing scopes and eight tooling-integrity checks pass. The renamed build reaches Disk BASIC, PRINT1+1 returns2 and SSC loads ready. Physical cold power cycling and conditional board-delay assumptions remain separate. Full original upstream histories are preserved before this single consolidated implementation commit.
27 lines
1.1 KiB
Systemverilog
27 lines
1.1 KiB
Systemverilog
`timescale 1ns/1ps
|
|
module keyboard_control_phase_tb;
|
|
reg clk=0;
|
|
always #5 clk=~clk;
|
|
reg [3:0] controls=4'b1000,expected_controls=4'b1000;
|
|
reg [72:0] keys=0;
|
|
reg [7:0] columns=0;
|
|
wire observed,reference_value;
|
|
actual_keyboard_controls candidate(clk,controls,keys,columns,observed);
|
|
reference_keyboard_controls reference(expected_controls,keys,columns,reference_value);
|
|
integer flags,column,pattern,comparisons=0;
|
|
initial begin
|
|
for(flags=0;flags<16;flags=flags+1)
|
|
for(column=0;column<256;column=column+1)
|
|
for(pattern=0;pattern<256;pattern=pattern+1) begin
|
|
@(posedge clk);controls=flags;columns=column;keys[55:48]=pattern;
|
|
#1;
|
|
if(observed!==reference_value) $fatal(1,"Keyboard flags changed before sampling edge");
|
|
@(negedge clk);#1;expected_controls=controls;#1;
|
|
if(observed!==reference_value) $fatal(1,"Keyboard row/control decode changed");
|
|
comparisons=comparisons+1;
|
|
end
|
|
$display("PASS %0d exhaustive keyboard-row comparisons: all 16 EE/MUGS/shift controls, 256 column masks, 256 key patterns; original decode and one-negative-edge observation",comparisons);
|
|
$finish;
|
|
end
|
|
endmodule
|