Line 42... |
Line 42... |
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
//
|
//
|
// CVS Revision History
|
// CVS Revision History
|
//
|
//
|
// $Log: not supported by cvs2svn $
|
// $Log: not supported by cvs2svn $
|
|
// Revision 1.1 2002/01/03 08:16:15 lampret
|
|
// New prefixes for RTL files, prefixed module names. Updated cache controllers and MMUs.
|
|
//
|
// Revision 1.10 2001/11/13 10:00:49 lampret
|
// Revision 1.10 2001/11/13 10:00:49 lampret
|
// Fixed tick timer interrupt reporting by using TTCR[IP] bit.
|
// Fixed tick timer interrupt reporting by using TTCR[IP] bit.
|
//
|
//
|
// Revision 1.9 2001/11/10 03:43:57 lampret
|
// Revision 1.9 2001/11/10 03:43:57 lampret
|
// Fixed exceptions.
|
// Fixed exceptions.
|
Line 72... |
Line 75... |
// synopsys translate_on
|
// synopsys translate_on
|
`include "or1200_defines.v"
|
`include "or1200_defines.v"
|
|
|
module or1200_tt(
|
module or1200_tt(
|
// RISC Internal Interface
|
// RISC Internal Interface
|
clk, rst, spr_cs, spr_write, spr_addr, spr_dat_i, spr_dat_o,
|
clk, rst, du_stall,
|
|
spr_cs, spr_write, spr_addr, spr_dat_i, spr_dat_o,
|
int
|
int
|
);
|
);
|
|
|
//
|
//
|
// RISC Internal Interface
|
// RISC Internal Interface
|
//
|
//
|
input clk; // Clock
|
input clk; // Clock
|
input rst; // Reset
|
input rst; // Reset
|
|
input du_stall; // DU stall
|
input spr_cs; // SPR CS
|
input spr_cs; // SPR CS
|
input spr_write; // SPR Write
|
input spr_write; // SPR Write
|
input [31:0] spr_addr; // SPR Address
|
input [31:0] spr_addr; // SPR Address
|
input [31:0] spr_dat_i; // SPR Write Data
|
input [31:0] spr_dat_i; // SPR Write Data
|
output [31:0] spr_dat_o; // SPR Read Data
|
output [31:0] spr_dat_o; // SPR Read Data
|
Line 179... |
Line 184... |
// Restart when match and TTMR[M]==0x1 or when rst is asserted
|
// Restart when match and TTMR[M]==0x1 or when rst is asserted
|
//
|
//
|
assign restart = (match && (ttmr[`OR1200_TT_TTMR_M] == 2'b01) || rst) ? 1'b1 : 1'b0;
|
assign restart = (match && (ttmr[`OR1200_TT_TTMR_M] == 2'b01) || rst) ? 1'b1 : 1'b0;
|
|
|
//
|
//
|
// Stop when match and TTMR[M]==0x2 or when TTMR[M]==0x0
|
// Stop when match and TTMR[M]==0x2 or when TTMR[M]==0x0 or when RISC is stalled by debug unit
|
//
|
//
|
assign stop = (match && (ttmr[`OR1200_TT_TTMR_M] == 2'b10) || (ttmr[`OR1200_TT_TTMR_M] == 2'b00)) ? 1'b1 : 1'b0;
|
assign stop = match & (ttmr[`OR1200_TT_TTMR_M] == 2'b10) | (ttmr[`OR1200_TT_TTMR_M] == 2'b00) | du_stall;
|
|
|
//
|
//
|
// Generate an interrupt request
|
// Generate an interrupt request
|
//
|
//
|
assign int = ttmr[`OR1200_TT_TTMR_IP];
|
assign int = ttmr[`OR1200_TT_TTMR_IP];
|