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

Subversion Repositories or1k

[/] [or1k/] [branches/] [mp3_stable/] [or1200/] [rtl/] [verilog/] [or1200.v] - Diff between revs 170 and 203

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

Rev 170 Rev 203
Line 42... Line 42...
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
//
//
// CVS Revision History
// CVS Revision History
//
//
// $Log: not supported by cvs2svn $
// $Log: not supported by cvs2svn $
 
// Revision 1.4  2001/08/13 03:36:20  lampret
 
// Added cfg regs. Moved all defines into one defines.v file. More cleanup.
 
//
// Revision 1.3  2001/08/09 13:39:33  lampret
// Revision 1.3  2001/08/09 13:39:33  lampret
// Major clean-up.
// Major clean-up.
//
//
// Revision 1.2  2001/07/22 03:31:54  lampret
// Revision 1.2  2001/07/22 03:31:54  lampret
// Fixed RAM's oen bug. Cache bypass under development.
// Fixed RAM's oen bug. Cache bypass under development.
Line 53... Line 56...
// Revision 1.1  2001/07/20 00:46:21  lampret
// Revision 1.1  2001/07/20 00:46:21  lampret
// Development version of RTL. Libraries are missing.
// Development version of RTL. Libraries are missing.
//
//
//
//
 
 
 
// synopsys translate_off
`include "timescale.v"
`include "timescale.v"
 
// synopsys translate_on
`include "defines.v"
`include "defines.v"
 
 
module or1200(
module or1200(
        // System
        // System
        clk, rst, pic_ints, clkdiv_by_2,
        clk, rst, pic_ints, clkdiv_by_2,
Line 166... Line 171...
wire    [3:0]            icbiu_sel;
wire    [3:0]            icbiu_sel;
 
 
//
//
// CPU's SPR access to various RISC units (shared wires)
// CPU's SPR access to various RISC units (shared wires)
//
//
 
wire                    supv;
wire    [aw-1:0] spr_addr;
wire    [aw-1:0] spr_addr;
wire    [dw-1:0] spr_dat_cpu;
wire    [dw-1:0] spr_dat_cpu;
wire    [31:0]           spr_cs;
wire    [31:0]           spr_cs;
wire                    spr_we;
wire                    spr_we;
 
 
//
//
 
// DMMU and CPU
 
//
 
wire                    dmmu_en;
 
wire                    dmmuexcept_miss;
 
wire                    dmmuexcept_fault;
 
wire    [31:0]           spr_dat_dmmu;
 
 
 
//
 
// DMMU and DC
 
//
 
wire    [aw-1:0] dcdmmu_paddr;
 
 
 
//
// DC and CPU's LSU
// DC and CPU's LSU
//
//
wire                    dclsu_stall;
wire                    dclsu_stall;
 
wire                    dclsu_unstall;
wire    [aw-1:0] dclsu_addr;
wire    [aw-1:0] dclsu_addr;
wire    [aw-1:0] dclsu_from_dc;
wire    [aw-1:0] dclsu_from_dc;
wire    [aw-1:0] dclsu_to_dc;
wire    [aw-1:0] dclsu_to_dc;
wire    [`LSUOP_WIDTH-1:0] dclsu_lsuop;
wire    [`LSUOP_WIDTH-1:0] dclsu_lsuop;
wire                    dc_en;
wire                    dc_en;
 
 
//
//
 
// IMMU and CPU
 
//
 
wire                    immu_en;
 
wire                    immuexcept_miss;
 
wire                    immuexcept_fault;
 
wire    [31:0]           spr_dat_immu;
 
 
 
//
// IC and CPU's ifetch
// IC and CPU's ifetch
//
//
wire                    icfetch_stall;
wire                    icfetch_stall;
wire    [aw-1:0] icfetch_addr;
wire    [aw-1:0] icfetch_addr;
wire    [dw-1:0] icfetch_dataout;
wire    [dw-1:0] icfetch_dataout;
 
wire    [`FETCHOP_WIDTH-1:0] icfetch_op;
wire                    ic_en;
wire                    ic_en;
 
 
//
//
 
// IMMU and IC
 
//
 
wire    [aw-1:0] icimmu_paddr;
 
 
 
//
// Connection between CPU and PIC
// Connection between CPU and PIC
//
//
wire    [dw-1:0] spr_dat_pic;
wire    [dw-1:0] spr_dat_pic;
wire                    pic_wakeup;
wire                    pic_wakeup;
wire                    int_low;
wire                    int_low;
Line 285... Line 319...
        .biu_from_biu(dcbiu_from_biu),
        .biu_from_biu(dcbiu_from_biu),
        .biu_sel(dcbiu_sel)
        .biu_sel(dcbiu_sel)
);
);
 
 
//
//
 
// Instantiation of IMMU
 
//
 
immu immu(
 
        // Rst and clk
 
        .clk(clk),
 
        .rst(rst),
 
 
 
        // Fetch i/f
 
        .immu_en(immu_en),
 
        .supv(supv),
 
        .immufetch_vaddr(icfetch_addr),
 
        .immufetch_op(icfetch_op),
 
        .immufetch_stall(),
 
 
 
        // Except I/F
 
        .immuexcept_miss(immuexcept_miss),
 
        .immuexcept_fault(immuexcept_fault),
 
 
 
        // SPR access
 
        .spr_cs(spr_cs[`SPR_GROUP_IMMU]),
 
        .spr_write(spr_we),
 
        .spr_addr(spr_addr),
 
        .spr_dat_i(spr_dat_cpu),
 
        .spr_dat_o(spr_dat_immu),
 
 
 
        // IC i/f
 
        .icimmu_paddr(icimmu_paddr)
 
);
 
 
 
//
// Instantiation of Instruction Cache
// Instantiation of Instruction Cache
//
//
ic ic(
ic ic(
        .clk(clk),
        .clk(clk),
        .rst(rst),
        .rst(rst),
        .clkdiv_by_2(clkdiv_by_2),
        .clkdiv_by_2(clkdiv_by_2),
 
 
        // These connect IC to CPU's ifetch
        // These connect IC to CPU's ifetch
        .icfetch_addr(icfetch_addr),
        .icfetch_addr(icimmu_paddr),
        .icfetch_op(`FETCHOP_LW),
        .icfetch_op(icfetch_op),
        .icfetch_dataout(icfetch_dataout),
        .icfetch_dataout(icfetch_dataout),
        .icfetch_stall(icfetch_stall),
        .icfetch_stall(icfetch_stall),
        .ic_en(ic_en),
        .ic_en(ic_en),
 
 
        // These connect IC to BIU
        // These connect IC to BIU
Line 317... Line 381...
//
//
cpu cpu(
cpu cpu(
        .clk(clk),
        .clk(clk),
        .rst(rst),
        .rst(rst),
 
 
        // These connect IC and IFETCHER inside CPU
        // Connection IC and IFETCHER inside CPU
        .ic_insn(icfetch_dataout),
        .ic_insn(icfetch_dataout),
        .ic_pcaddr(icfetch_addr),
        .ic_addr(icfetch_addr),
        .ic_stall(icfetch_stall),
        .ic_stall(icfetch_stall),
 
        .ic_fetchop(icfetch_op),
        .ic_en(ic_en),
        .ic_en(ic_en),
 
 
        // These connect CPU to external Trace port
        // Connection CPU to external Trace port
        .tp_dir_in(tp_dir_in),
        .tp_dir_in(tp_dir_in),
        .tp_sel(tp_sel),
        .tp_sel(tp_sel),
        .tp_in(tp_in),
        .tp_in(tp_in),
        .tp_out(tp_out),
        .tp_out(tp_out),
 
 
        // These connect DC and CPU's LSU
        // Connection IMMU and CPU internally
 
        .immu_en(immu_en),
 
        .immuexcept_miss(immuexcept_miss),
 
        .immuexcept_fault(immuexcept_fault),
 
 
 
        // Connection DMMU and CPU internally
 
        .dmmu_en(dmmu_en),
 
        .dmmuexcept_miss(dmmuexcept_miss),
 
        .dmmuexcept_fault(dmmuexcept_fault),
 
 
 
        // Connection DC and CPU's LSU
        .dclsu_stall(dclsu_stall),
        .dclsu_stall(dclsu_stall),
 
        .dclsu_unstall(dclsu_unstall),
        .dclsu_addr(dclsu_addr),
        .dclsu_addr(dclsu_addr),
        .dclsu_datain(dclsu_from_dc),
        .dclsu_datain(dclsu_from_dc),
        .dclsu_dataout(dclsu_to_dc),
        .dclsu_dataout(dclsu_to_dc),
        .dclsu_lsuop(dclsu_lsuop),
        .dclsu_lsuop(dclsu_lsuop),
        .dc_en(dc_en),
        .dc_en(dc_en),
 
 
        // These connect PIC and CPU's EXCEPT
        // Connection PIC and CPU's EXCEPT
        .int_high(int_high_tt),
        .int_high(int_high_tt),
        .int_low(int_low),
        .int_low(int_low),
 
 
        // SPRs
        // SPRs
 
        .supv(supv),
        .spr_addr(spr_addr),
        .spr_addr(spr_addr),
        .spr_dataout(spr_dat_cpu),
        .spr_dataout(spr_dat_cpu),
        .spr_dat_pic(spr_dat_pic),
        .spr_dat_pic(spr_dat_pic),
        .spr_dat_tt(spr_dat_tt),
        .spr_dat_tt(spr_dat_tt),
        .spr_dat_pm(spr_dat_pm),
        .spr_dat_pm(spr_dat_pm),
 
        .spr_dat_dmmu(spr_dat_dmmu),
        .spr_cs(spr_cs),
        .spr_cs(spr_cs),
        .spr_we(spr_we),
        .spr_we(spr_we),
 
 
        // These connect trace port to caches and MMUs
        // These connect trace port to caches and MMUs
        .tp2w(tp2w),
        .tp2w(tp2w),
        .tp3w(tp3w)
        .tp3w(tp3w)
);
);
 
 
//
//
 
// Instantiation of DMMU
 
//
 
dmmu dmmu(
 
        // Rst and clk
 
        .clk(clk),
 
        .rst(rst),
 
 
 
        // LSU i/f
 
        .dmmu_en(dmmu_en),
 
        .supv(supv),
 
        .dmmulsu_vaddr(dclsu_addr),
 
        .dmmulsu_lsuop(dclsu_lsuop),
 
        .dmmulsu_stall(),
 
 
 
        // Except I/F
 
        .dmmuexcept_miss(dmmuexcept_miss),
 
        .dmmuexcept_fault(dmmuexcept_fault),
 
 
 
        // SPR access
 
        .spr_cs(spr_cs[`SPR_GROUP_DMMU]),
 
        .spr_write(spr_we),
 
        .spr_addr(spr_addr),
 
        .spr_dat_i(spr_dat_cpu),
 
        .spr_dat_o(spr_dat_dmmu),
 
 
 
        // DC i/f
 
        .dcdmmu_paddr(dcdmmu_paddr)
 
);
 
 
 
//
// Instantiation of Data Cache
// Instantiation of Data Cache
//
//
dc dc(
dc dc(
        .clk(clk),
        .clk(clk),
        .rst(rst),
        .rst(rst),
        .clkdiv_by_2(clkdiv_by_2),
        .clkdiv_by_2(clkdiv_by_2),
 
 
        // These connect DC to CPU's LSU
        // These connect DC to CPU's LSU
        .dclsu_addr(dclsu_addr),
        .dclsu_addr(dcdmmu_paddr),
        .dclsu_lsuop(dclsu_lsuop),
        .dclsu_lsuop(dclsu_lsuop),
        .dclsu_datain(dclsu_to_dc),
        .dclsu_datain(dclsu_to_dc),
        .dclsu_dataout(dclsu_from_dc),
        .dclsu_dataout(dclsu_from_dc),
        .dclsu_stall(dclsu_stall),
        .dclsu_stall(dclsu_stall),
 
        .dclsu_unstall(dclsu_unstall),
        .dc_en(dc_en),
        .dc_en(dc_en),
 
 
        // These connect DC to BIU
        // These connect DC to BIU
        .dcbiu_rdy(dcbiu_rdy),
        .dcbiu_rdy(dcbiu_rdy),
        .dcbiu_datain(dcbiu_from_biu),
        .dcbiu_datain(dcbiu_from_biu),

powered by: WebSVN 2.1.0

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