OpenCores
URL https://opencores.org/ocsvn/raptor64/raptor64/trunk

Subversion Repositories raptor64

[/] [raptor64/] [trunk/] [rtl/] [verilog/] [Raptor64_tb.v] - Diff between revs 45 and 48

Show entire file | Details | Blame | View Log

Rev 45 Rev 48
Line 30... Line 30...
wire tc_ack;
wire tc_ack;
wire pic_ack;
wire pic_ack;
reg pulse1000Hz,pulse100Hz;
reg pulse1000Hz,pulse100Hz;
wire [7:0] config_rec;
wire [7:0] config_rec;
reg [7:0] config_reco;
reg [7:0] config_reco;
 
//wire sm_ack;
 
wire [7:0] sm_dato;
 
 
wire uart_ack = sys_iocyc && sys_stb && (sys_adr[23:8]==16'hDC_0A);
wire uart_ack = sys_iocyc && sys_stb && (sys_adr[23:8]==16'hDC_0A);
wire rast_ack = sys_iocyc && sys_stb && (sys_adr[23:8]==16'hDA_01);
wire rast_ack = sys_iocyc && sys_stb && (sys_adr[23:8]==16'hDA_01);
wire AC97_ack = sys_iocyc && sys_stb && (sys_adr[23:8]==16'hDC_10);
wire AC97_ack = sys_iocyc && sys_stb && (sys_adr[23:8]==16'hDC_10);
wire spr_ack =  sys_iocyc && sys_stb && (sys_adr[23:16]==8'hD8);
wire spr_ack =  sys_iocyc && sys_stb && (sys_adr[23:16]==8'hD8);
wire Led_ack =  sys_iocyc && sys_stb && (sys_adr[23:8]==16'hDC_06);
wire Led_ack =  sys_iocyc && sys_stb && (sys_adr[23:8]==16'hDC_06);
wire dt_ack  =  sys_iocyc && sys_stb && (sys_adr[23:8]==16'hDC_04);
wire dt_ack  =  sys_iocyc && sys_stb && (sys_adr[23:8]==16'hDC_04);
wire p100ack =  sys_iocyc && sys_stb && (sys_adr[23:0]==24'hDCFFFC);
wire p100ack =  sys_iocyc && sys_stb && (sys_adr[23:0]==24'hDCFFFC);
wire p1000ack =  sys_iocyc && sys_stb && (sys_adr[23:0]==24'hDCFFFD);
wire p1000ack =  sys_iocyc && sys_stb && (sys_adr[23:0]==24'hDCFFFD);
wire config_rec_ack = sys_iocyc && sys_stb && sys_adr[23:0]==24'hDCFFFF;
wire config_rec_ack = sys_iocyc && sys_stb && sys_adr[23:3]==21'b1101_1100_1111_1111_1111_0;
wire perr_ack = sys_iocyc && sys_stb && sys_adr[23:0]==24'hDCFFFE;
wire perr_ack = sys_iocyc && sys_stb && sys_adr[23:0]==24'hDCFFFE;
wire tmp_ack = sys_iocyc && sys_stb && (sys_adr[23:8]==16'hDC03);
wire tmp_ack = sys_iocyc && sys_stb && (sys_adr[23:8]==16'hDC03);
 
wire sm_ack =  sys_iocyc && sys_stb && (sys_adr[23:16]==8'hDB);
 
 
assign ram_ack = sys_cyc && sys_stb && (sys_adr[63:32]==32'd1);
//assign ram_ack = sys_cyc && sys_stb && (sys_adr[63:32]==32'd1);
assign sys_ack = br_ack|stk_ack|scr_ack|tc_ack|pic_ack|ram_ack|uart_ack|rast_ack|AC97_ack|spr_ack|Led_ack|dt_ack|p100ack|p1000ack|config_rec_ack|tmp_ack|perr_ack;
 
 
 
assign config_rec = 8'b0000_0111;
assign config_rec = 8'b0000_0111;
 
 
always @(config_rec_ack)
always @(config_rec_ack)
        config_reco <= config_rec_ack ? config_rec : 8'd0;
        config_reco <= config_rec_ack ? config_rec : 8'd0;
 
 
 
wire cs_ram = sys_cyc && sys_stb && (sys_adr[63:32]==32'd1);
 
reg [63:0] sysram [0:16000];
 
always @(posedge clk)
 
if (cs_ram & sys_we) begin
 
        $display("Wrote ram[%h]=%h", sys_adr, sys_dbo);
 
        sysram[sys_adr[15:3]] <= sys_dbo;
 
end
 
wire [63:0] ramo = cs_ram ? sysram[sys_adr[15:3]] : 64'd0;
 
reg ack1,ack2,ack3,ack4,ack5,ack6,ack7,ack8;
 
always @(posedge clk)
 
begin
 
        ack1 <= cs_ram;
 
        ack2 <= ack1 & cs_ram;
 
        ack3 <= ack2 & cs_ram;
 
        ack4 <= ack3 & cs_ram;
 
        ack5 <= ack4 & cs_ram;
 
        ack6 <= ack5 & cs_ram;
 
        ack7 <= ack6 & cs_ram;
 
        ack8 <= ack7 & cs_ram;
 
end
 
wire ram_ack = cs_ram & ack8;
 
 
 
assign sys_ack = br_ack|stk_ack|scr_ack|tc_ack|pic_ack|ram_ack|uart_ack|rast_ack|
 
        AC97_ack|spr_ack|Led_ack|dt_ack|
 
        p100ack|p1000ack|config_rec_ack|tmp_ack|perr_ack|sm_ack;
 
 
initial begin
initial begin
        clk = 1;
        clk = 1;
        pulse1000Hz = 0;
        pulse1000Hz = 0;
        pulse100Hz = 0;
        pulse100Hz = 0;
Line 92... Line 119...
        if (p100ack)
        if (p100ack)
                pulse100HzB <= 1'b0;
                pulse100HzB <= 1'b0;
        end
        end
end
end
 
 
 
//sema_mem usm
 
//(
 
//      .rst_i(rst),
 
//      .clk_i(clk),
 
//      .cyc_i(sys_iocyc),
 
//      .stb_i(sys_stb),
 
//      .ack_o(sm_ack),
 
//      .we_i(sys_we),
 
//      .adr_i(sys_adr[23:0]),
 
//      .dat_i(sys_dbo[7:0]),
 
//      .dat_o(sm_dato)
 
//);
 
 
 
 
rtfTextController tc1
rtfTextController tc1
(
(
        .rst_i(rst),
        .rst_i(rst),
        .clk_i(clk),
        .clk_i(clk),
Line 828... Line 868...
64'hFFFFFFFFFFFFFFE8:   romout <= 64'h37800000000DE000;
64'hFFFFFFFFFFFFFFE8:   romout <= 64'h37800000000DE000;
64'hFFFFFFFFFFFFFFF0:   romout <= 64'h000000CFFFFFFA00;
64'hFFFFFFFFFFFFFFF0:   romout <= 64'h000000CFFFFFFA00;
64'hFFFFFFFFFFFFFFF8:   romout <= 64'h37800000000DE000;
64'hFFFFFFFFFFFFFFF8:   romout <= 64'h37800000000DE000;
default:        romout <= 64'd0;
default:        romout <= 64'd0;
endcase
endcase
assign sys_dbi = br_dato|keybdout|stk_dato|scr_dato| {4{tc_dato}} | {4{pic_dato}} | {8{config_reco}};
assign sys_dbi = br_dato|keybdout|stk_dato|scr_dato| {4{tc_dato}}
 
        | {4{pic_dato}} | {8{config_reco}} | ramo | {8{sm_dato}};
 
 
 
 
Raptor64sc u1
Raptor64sc u1
(
(
        .rst_i(rst),
        .rst_i(rst),

powered by: WebSVN 2.1.0

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