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

Subversion Repositories or1k

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

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

Rev 166 Rev 168
Line 42... Line 42...
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
//
//
// CVS Revision History
// CVS Revision History
//
//
// $Log: not supported by cvs2svn $
// $Log: not supported by cvs2svn $
 
// Revision 1.2  2001/07/22 03:31:54  lampret
 
// Fixed RAM's oen bug. Cache bypass under development.
 
//
// 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.
//
//
//
//
 
 
`include "general.h"
`include "timescale.v"
 
`include "defines.v"
 
 
module or1200(
module or1200(
 
        // System
        clk, rst, pic_ints, clkdiv_by_2,
        clk, rst, pic_ints, clkdiv_by_2,
 
 
        // Instruction WISHBONE INTERFACE
        // Instruction WISHBONE INTERFACE
        iwb_clk_i, iwb_rst_i, iwb_ack_i, iwb_err_i, iwb_rty_i, iwb_dat_i,
        iwb_clk_i, iwb_rst_i, iwb_ack_i, iwb_err_i, iwb_rty_i, iwb_dat_i,
        iwb_cyc_o, iwb_adr_o, iwb_stb_o, iwb_we_o, iwb_sel_o, iwb_dat_o,
        iwb_cyc_o, iwb_adr_o, iwb_stb_o, iwb_we_o, iwb_sel_o, iwb_dat_o,
Line 74... Line 79...
parameter dw = `OPERAND_WIDTH;
parameter dw = `OPERAND_WIDTH;
parameter aw = `OPERAND_WIDTH;
parameter aw = `OPERAND_WIDTH;
parameter ppic_ints = `PIC_INTS;
parameter ppic_ints = `PIC_INTS;
 
 
//
//
 
// I/O
 
//
 
 
 
//
 
// System
 
//
 
input                   clk;
 
input                   rst;
 
input                   clkdiv_by_2;
 
input   [ppic_ints-1:0]  pic_ints;
 
 
 
//
// Instruction WISHBONE interface
// Instruction WISHBONE interface
//
//
input                   iwb_clk_i;      // clock input
input                   iwb_clk_i;      // clock input
input                   iwb_rst_i;      // reset input
input                   iwb_rst_i;      // reset input
input                   iwb_ack_i;      // normal termination
input                   iwb_ack_i;      // normal termination
Line 106... Line 123...
output                  dwb_we_o;       // indicates write transfer
output                  dwb_we_o;       // indicates write transfer
output [3:0]             dwb_sel_o;      // byte select outputs
output [3:0]             dwb_sel_o;      // byte select outputs
output [dw-1:0]          dwb_dat_o;      // output data bus
output [dw-1:0]          dwb_dat_o;      // output data bus
 
 
//
//
// System
// Power Management
//
//
input                   clk;
 
input                   rst;
 
input                   clkdiv_by_2;
 
input [ppic_ints-1:0]    pic_ints;
 
 
 
// CPU and PM
 
input                   pm_cpustall;
input                   pm_cpustall;
output                  pm_clksd;
output                  pm_clksd;
output                  pm_dc_gate;
output                  pm_dc_gate;
output                  pm_ic_gate;
output                  pm_ic_gate;
output                  pm_dmmu_gate;
output                  pm_dmmu_gate;
Line 125... Line 136...
output                  pm_tt_gate;
output                  pm_tt_gate;
output                  pm_cpu_gate;
output                  pm_cpu_gate;
output                  pm_wakeup;
output                  pm_wakeup;
output                  pm_lvolt;
output                  pm_lvolt;
 
 
 
//
 
// Internal wires and regs
 
//
 
 
 
//
// DC to BIU
// DC to BIU
 
//
wire                    dcbiu_rdy;
wire                    dcbiu_rdy;
wire [dw-1:0]            dcbiu_from_biu;
wire [dw-1:0]            dcbiu_from_biu;
wire [dw-1:0]            dcbiu_to_biu;
wire [dw-1:0]            dcbiu_to_biu;
wire [aw-1:0]            dcbiu_addr;
wire [aw-1:0]            dcbiu_addr;
wire                    dcbiu_read;
wire                    dcbiu_read;
wire                    dcbiu_write;
wire                    dcbiu_write;
wire [3:0]               dcbiu_sel;
wire [3:0]               dcbiu_sel;
 
 
 
//
// IC to BIU
// IC to BIU
 
//
wire                    icbiu_rdy;
wire                    icbiu_rdy;
wire [dw-1:0]            icbiu_from_biu;
wire [dw-1:0]            icbiu_from_biu;
wire [aw-1:0]            icbiu_addr;
wire [aw-1:0]            icbiu_addr;
wire                    icbiu_read;
wire                    icbiu_read;
 
 
 
//
// CPU's SPR access to various RISC units (shared wires)
// CPU's SPR access to various RISC units (shared wires)
 
//
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;
 
 
 
//
// DC and CPU's LSU
// DC and CPU's LSU
 
//
wire                    dclsu_stall;
wire                    dclsu_stall;
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;
 
 
 
//
// 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;
 
 
 
//
// 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;
wire                    int_high;
wire                    int_high;
wire                    int_high_tt;
wire                    int_high_tt;
 
 
 
//
// Connection between CPU and PM
// Connection between CPU and PM
 
//
wire [dw-1:0]            spr_dat_pm;
wire [dw-1:0]            spr_dat_pm;
 
 
 
//
// CPU and TT
// CPU and TT
 
//
wire [dw-1:0]            spr_dat_tt;
wire [dw-1:0]            spr_dat_tt;
wire                    tt_int;
wire                    tt_int;
 
 
 
//
// CPU and external Trace port
// CPU and external Trace port
 
//
input                   tp_dir_in;
input                   tp_dir_in;
input [1:0]              tp_sel;
input [1:0]              tp_sel;
input [dw-1:0]           tp_in;
input [dw-1:0]           tp_in;
output [dw-1:0]          tp_out;
output [dw-1:0]          tp_out;
 
 
 
//
// Trace port and caches/MMUs
// Trace port and caches/MMUs
 
//
wire [`TP2W_WIDTH-1:0]   tp2w;
wire [`TP2W_WIDTH-1:0]   tp2w;
wire [`TP3W_WIDTH-1:0]   tp3w;
wire [`TP3W_WIDTH-1:0]   tp3w;
wire [`TP4W_WIDTH-1:0]   tp4w;
 
wire [dw-1:0]            tpdw;
 
 
 
//
//
// Assignments
// Assignments
//
//
assign int_high_tt = int_high | tt_int;
assign int_high_tt = int_high | tt_int;
Line 266... Line 300...
        .icbiu_datain(icbiu_from_biu),
        .icbiu_datain(icbiu_from_biu),
        .icbiu_addr(icbiu_addr),
        .icbiu_addr(icbiu_addr),
        .icbiu_read(icbiu_read),
        .icbiu_read(icbiu_read),
 
 
        // These connect IC to SPRS
        // These connect IC to SPRS
        .spr_dat_i(spr_dat_cpu),
        .spr_dat_i(spr_dat_cpu)
 
 
        // Trace port
 
        .tp4w(tp4w),
 
        .tpdw(tpdw)
 
);
);
 
 
//
//
// Instantiation of Instruction Cache
// Instantiation of Instruction Cache
//
//
Line 297... Line 327...
        .dclsu_stall(dclsu_stall),
        .dclsu_stall(dclsu_stall),
        .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),
 
 
        // These connect PIC and CPU's EXCEPT
        // These connect PIC and CPU's EXCEPT
        .int_high(int_high_tt),
        .int_high(int_high_tt),
        .int_low(int_low),
        .int_low(int_low),
 
 
Line 313... Line 344...
        .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)
        .tp4w(tp4w),
 
        .tpdw(tpdw)
 
);
);
 
 
//
//
// Instantiation of Data Cache
// Instantiation of Data Cache
//
//
Line 332... Line 361...
        .dclsu_addr(dclsu_addr),
        .dclsu_addr(dclsu_addr),
        .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),
 
        .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),
        .dcbiu_dataout(dcbiu_to_biu),
        .dcbiu_dataout(dcbiu_to_biu),
Line 343... Line 373...
        .dcbiu_read(dcbiu_read),
        .dcbiu_read(dcbiu_read),
        .dcbiu_write(dcbiu_write),
        .dcbiu_write(dcbiu_write),
        .dcbiu_sel(dcbiu_sel),
        .dcbiu_sel(dcbiu_sel),
 
 
        // Trace port
        // Trace port
        .tp2w(tp2w),
        .tp2w(tp2w)
        .tp3w(tp3w),
 
        .tpdw(tpdw)
 
);
);
 
 
//
//
// Programmable interrupt controller
// Programmable interrupt controller
//
//
Line 412... Line 440...
);
);
 
 
 
 
endmodule
endmodule
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

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