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

Subversion Repositories thor

[/] [thor/] [trunk/] [FT64v5/] [rtl/] [common/] [FT64_mpu.v] - Diff between revs 50 and 51

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 50 Rev 51
Line 109... Line 109...
wire sptr_o;
wire sptr_o;
 
 
wire cs_pit = adr[31:8]==24'hFFDC11;
wire cs_pit = adr[31:8]==24'hFFDC11;
wire cs_crd = adr[31:11]==21'd0;        // $00000000 in virtual address space
wire cs_crd = adr[31:11]==21'd0;        // $00000000 in virtual address space
 
 
 
// Need to recreate the a2 address bit for 32 bit peripherals.
 
wire [31:0] adr32 = {adr[31:3],|sel_o[7:4],2'b00};
 
wire [31:0] dat32 = |sel_o[7:4] ? dat_o[63:32] : dat_o[31:0];
 
 
FT64_pit upit1
FT64_pit upit1
(
(
        .rst_i(rst_i),
        .rst_i(rst_i),
        .clk_i(clk_i),
        .clk_i(clk_i),
        .cs_i(cs_pit),
        .cs_i(cs_pit),
        .cyc_i(cyc),
        .cyc_i(cyc),
        .stb_i(stb),
        .stb_i(stb),
        .ack_o(pit_ack),
        .ack_o(pit_ack),
        .sel_i(sel_o[7:4]|sel_o[3:0]),
        .sel_i(sel_o[7:4]|sel_o[3:0]),
        .we_i(we_o),
        .we_i(we_o),
        .adr_i(adr[5:0]),
        .adr_i(adr32[5:0]),
        .dat_i(dat_o[31:0]),
        .dat_i(dat32),
        .dat_o(pit_dato),
        .dat_o(pit_dato),
        .clk0(1'b0),
        .clk0(1'b0),
        .gate0(1'b0),
        .gate0(1'b0),
        .out0(pit_out0),
        .out0(pit_out0),
        .clk1(1'b0),
        .clk1(1'b0),
Line 141... Line 145...
        .clk_i(clk_i),          // system clock
        .clk_i(clk_i),          // system clock
        .cyc_i(cyc),
        .cyc_i(cyc),
        .stb_i(stb),
        .stb_i(stb),
        .ack_o(pic_ack),    // controller is ready
        .ack_o(pic_ack),    // controller is ready
        .wr_i(we_o),            // write
        .wr_i(we_o),            // write
        .adr_i(adr),            // address
        .adr_i(adr32),          // address
        .dat_i(dat_o[31:0]),
        .dat_i(dat32),
        .dat_o(pic_dato),
        .dat_o(pic_dato),
        .vol_o(),                       // volatile register selected
        .vol_o(),                       // volatile register selected
        .i1(i1),
        .i1(i1),
        .i2(i2),
        .i2(i2),
        .i3(i3),
        .i3(i3),
Line 197... Line 201...
        .s_ex_i(icl),
        .s_ex_i(icl),
        .s_cyc_i(cyc),
        .s_cyc_i(cyc),
        .s_stb_i(stb),
        .s_stb_i(stb),
        .s_ack_o(mmu_ack),
        .s_ack_o(mmu_ack),
        .s_wr_i(we_o),
        .s_wr_i(we_o),
        .s_adr_i(adr),
        .s_adr_i(adr32),
        .s_dat_i(dat_o[31:0]),
        .s_dat_i(dat32),
        .s_dat_o(mmu_dato),
        .s_dat_o(mmu_dato),
        .cyc_o(cyc_o),
        .cyc_o(cyc_o),
        .stb_o(stb_o),
        .stb_o(stb_o),
        .pea_o(adr_o),
        .pea_o(adr_o),
        .exv_o(exv),
        .exv_o(exv),
Line 231... Line 235...
4'b001?:        dati <= {2{pit_dato}};
4'b001?:        dati <= {2{pit_dato}};
4'b0001:        dati <= crd_dato;
4'b0001:        dati <= crd_dato;
default:    dati <= dat_i;
default:    dati <= dat_i;
endcase
endcase
 
 
assign ack = ack_i|mmu_ack|pic_ack|crd_ack;
assign ack = ack_i|mmu_ack|pic_ack|pit_ack|crd_ack;
 
 
FT64 ucpu1
FT64 ucpu1
(
(
    .hartid(hartid_i),
    .hartid(hartid_i),
    .rst(rst_i),
    .rst(rst_i),

powered by: WebSVN 2.1.0

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