Line 41... |
Line 41... |
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
//
|
//
|
// CVS Revision History
|
// CVS Revision History
|
//
|
//
|
// $Log: not supported by cvs2svn $
|
// $Log: not supported by cvs2svn $
|
|
// Revision 1.1.1.1 2004/09/08 16:24:49 jcastillo
|
|
// Initial release
|
|
//
|
|
|
#include "systemc.h"
|
#include "systemc.h"
|
|
|
class transactor_ports:public sc_module
|
class transactor_ports:public sc_module
|
{
|
{
|
Line 70... |
Line 73... |
public:
|
public:
|
//Funciones para el transactor
|
//Funciones para el transactor
|
virtual void resetea (void) = 0;
|
virtual void resetea (void) = 0;
|
virtual void new_text (void) = 0;
|
virtual void new_text (void) = 0;
|
virtual void print_result (void) = 0;
|
virtual void print_result (void) = 0;
|
|
virtual void wait_result (void) = 0;
|
virtual void hash (sc_uint < 32 > data_4, sc_uint < 32 > data_3,
|
virtual void hash (sc_uint < 32 > data_4, sc_uint < 32 > data_3,
|
sc_uint < 32 > data_2, sc_uint < 32 > data_1) = 0;
|
sc_uint < 32 > data_2, sc_uint < 32 > data_1) = 0;
|
virtual void wait_cycles (int cycles) = 0;
|
virtual void wait_cycles (int cycles) = 0;
|
|
|
};
|
};
|
Line 109... |
Line 113... |
newtext_i.write (1);
|
newtext_i.write (1);
|
wait (clk->posedge_event ());
|
wait (clk->posedge_event ());
|
newtext_i.write (0);
|
newtext_i.write (0);
|
}
|
}
|
|
|
|
void wait_result ()
|
|
{
|
|
wait (ready_o->posedge_event ());
|
|
}
|
|
|
|
|
void print_result ()
|
void print_result ()
|
{
|
{
|
sc_biguint < 128 > data_o_var;
|
sc_biguint < 128 > data_o_var;
|
|
|
wait (ready_o->posedge_event ());
|
wait (ready_o->posedge_event ());
|
data_o_var = data_o.read ();
|
data_o_var = data_o.read ();
|
cout << "HASH: " << (int) (sc_uint < 32 >) data_o_var.range (127,
|
|
96) << " " <<
|
cout << "HASH: " << (int) (sc_uint < 32 >) data_o_var.range (127,96) << " " << (int) (sc_uint < 32 >) data_o_var.range (95,64) << " " << (int) (sc_uint <32 >)
|
(int) (sc_uint < 32 >) data_o_var.range (95,
|
data_o_var.range (63,32) << " " << (int) (sc_uint <32 >) data_o_var.range (31,0) <<endl;
|
64) << " " << (int) (sc_uint <
|
|
32 >)
|
|
data_o_var.range (63,
|
|
32) << " " << (int) (sc_uint <
|
|
32 >) data_o_var.range (31,
|
|
0) <<
|
|
endl;
|
|
}
|
}
|
|
|
void hash (sc_uint < 32 > data_4, sc_uint < 32 > data_3,
|
void hash (sc_uint < 32 > data_4, sc_uint < 32 > data_3,
|
sc_uint < 32 > data_2, sc_uint < 32 > data_1)
|
sc_uint < 32 > data_2, sc_uint < 32 > data_1)
|
{
|
{
|