Home Products News Services Place an Order Partners and Affiliations Site Map Contact us

Converted SystemC CPU

 

Here is the header file of the datapath of the SAYEH CPU in SystemC.

 

/////////////////////////////////////////////////////////////////////////////////////

// This code is automatically generated by ROSTA-VSC.

// ROSTA-VSC Version1.0.0.1

// Copyright(c) 2005 Digital Dynamics Co., All rights reserved.

/////////////////////////////////////////////////////////////////////////////////////

 

//datapath.h

 

#ifndef datapath_H

#define datapath_H

 

#include "systemc.h"

#include "addressingunit.h"

#include "arithmeticunit.h"

#include "registerfile.h"

#include "instrunctionregister.h"

#include "statusregister.h"

#include "windowpointer.h"

 

#include "sc_util.h"

 

SC_MODULE (datapath) {

 

    //Module Declaration Part

   sc_in clk;

   sc_inout_rv<16> databus;

   sc_out_rv<16> addressbus;

   sc_in resetpc;

   sc_in pcplusi;

   sc_in pcplus1;

   sc_in rplusi;

   sc_in rplus0;

   sc_in rs_on_addressunitrside;

   sc_in rd_on_addressunitrside;

   sc_in enablepc;

   sc_in b15to0;

   sc_in aandb;

   sc_in aorb;

   sc_in notb;

   sc_in shlb;

   sc_in shrb;

   sc_in aaddb;

   sc_in asubb;

   sc_in amulb;

   sc_in acmpb;

   sc_in rflwrite;

   sc_in rfhwrite;

   sc_in wpreset;

   sc_in wpadd;

   sc_in irload;

   sc_in srload;

   sc_in address_on_databus;

   sc_in alu_on_databus;

   sc_in ir_on_lopndbus;

   sc_in ir_on_hopndbus;

   sc_in rfright_on_opndbus;

   sc_in cset;

   sc_in creset;

   sc_in zset;

   sc_in zreset;

   sc_in shadow;

   sc_out_rv<8> instruction;

   sc_out cout;

   sc_out zout;

   sc_out shadowen;

 

   sc_signal_rv<16> right;

   sc_signal_rv<16> left;

   sc_signal_rv<16> opndbus;

   sc_signal_rv<16> aluout;

   sc_signal_rv<16> irout;

   sc_signal_rv<16> address;

   sc_signal_rv<16> addressunitrsidebus;

   sc_signal srcin;

   sc_signal srzin;

   sc_signal srzout;

   sc_signal srcout;

   sc_signal_rv<3> wpout;

   sc_signal_rv<2> laddr;

   sc_signal_rv<2> raddr;

 

 

void Line478_25 ();

void Line481_16 ();

void Line483_13 ();

void Line485_26 ();

void Line487_27 ();

void Line489_13 ();

void Line491_10 ();

void Line493_10 ();

void Line495_17 ();

void Line497_14 ();

void Line499_11 ();

void Line501_11 ();

 

addressingunit* COMP_addressingunit;

arithmeticunit* COMP_arithmeticunit;

registerfile* COMP_registerfile;

instrunctionregister* COMP_instrunctionregister;

statusregister* COMP_statusregister;

windowpointer* COMP_windowpointer;

 

void TEMP_PORT_SIGNALS();

 

sc_signal_rv<8 >iroutX7X0;

sc_signal_rv<3 >iroutX2X0;

sc_signal_resolved SIG_opndbus[16];

 

void SIGNAL_PROBLEM();

 

//Module Constructor

SC_CTOR(datapath) {

 

SC_METHOD(Line478_25);

sensitive <<RIGHT<< FONT;

sensitive <<RS_ON_ADDRESSUNITRSIDE<< FONT;

sensitive <<LEFT<< FONT;

sensitive <<RD_ON_ADDRESSUNITRSIDE<< FONT;

 

SC_METHOD(Line481_16);

sensitive <<ADDRESS<< FONT;

 

SC_METHOD(Line483_13);

sensitive <<ADDRESS<< FONT;

sensitive <<ADDRESS_ON_DATABUS<< FONT;

sensitive <<ALUOUT<< FONT;

sensitive <<ALU_ON_DATABUS<< FONT;

 

SC_METHOD(Line485_26);

sensitive <<IROUT<< FONT;

sensitive <<IR_ON_LOPNDBUS<< FONT;

 

SC_METHOD(Line487_27);

sensitive <<IROUT<< FONT;

sensitive <<IR_ON_HOPNDBUS<< FONT;

 

SC_METHOD(Line489_13);

sensitive <<RIGHT<< FONT;

sensitive <<RFRIGHT_ON_OPNDBUS<< FONT;

 

SC_METHOD(Line491_10);

sensitive <<SRZOUT<< FONT;

 

SC_METHOD(Line493_10);

sensitive <<SRCOUT<< FONT;

 

SC_METHOD(Line495_17);

sensitive <<IROUT<< FONT;

sensitive <<SHADOW<< FONT;

sensitive <<IROUT<< FONT;

 

SC_METHOD(Line497_14);

sensitive <<IROUT<< FONT;

 

SC_METHOD(Line499_11);

sensitive <<IROUT<< FONT;

sensitive <<SHADOW<< FONT;

sensitive <<IROUT<< FONT;

 

SC_METHOD(Line501_11);

sensitive <<IROUT<< FONT;

sensitive <<SHADOW<< FONT;

bsensitive <<IROUT<< FONT;

 

SC_METHOD(SIGNAL_PROBLEM);

for(int I = 0;I< 16;I++)

    sensitive << SIG_opndbus[I];

 

COMP_addressingunit = new addressingunit("COMP_addressingunit");

(*COMP_addressingunit)(addressunitrsidebus, iroutX7X0, address, clk, resetpc, pcplusi, pcplus1, rplusi, rplus0, enablepc);

 

COMP_arithmeticunit = new arithmeticunit("COMP_arithmeticunit");

(*COMP_arithmeticunit)(left, opndbus, b15to0, aandb, aorb, notb, shlb, shrb, aaddb, asubb, amulb, acmpb, aluout, srcout, srzin, srcin);

 

COMP_registerfile = new registerfile("COMP_registerfile");

(*COMP_registerfile)(databus, clk, wpout, laddr, raddr, rflwrite, rfhwrite, left, right);

 

COMP_instrunctionregister = new instrunctionregister("COMP_instrunctionregister");

(*COMP_instrunctionregister)(databus, irload, clk, irout);

 

COMP_statusregister = new statusregister("COMP_statusregister");

(*COMP_statusregister)(srcin, srzin, srload, clk, cset, creset, zset, zreset, srcout, srzout);

 

 COMP_windowpointer= new windowpointer("COMP_windowpointer");

(*COMP_windowpointer)(iroutX2X0, clk, wpreset, wpadd, wpout);

 

  SC_METHOD(TEMP_PORT_SIGNALS);

  sensitive <<IROUT<< FONT;

 }

 };

 #endif

Copyright 2005 . Digimics Corporation, All rights reserved.