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

Subversion Repositories async_sdm_noc

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /async_sdm_noc/branches/init/common/tb
    from Rev 31 to Rev 32
    Reverse comparison

Rev 31 → Rev 32

/anaproc.v
0,0 → 1,32
/*
Asynchronous SDM NoC
(C)2011 Wei Song
Advanced Processor Technologies Group
Computer Science, the Univ. of Manchester, UK
Authors:
Wei Song wsong83@gmail.com
License: LGPL 3.0 or later
The SystemC to keep a module of the simulation analysis object.
History:
27/02/2011 Initial version. <wsong83@gmail.com>
30/05/2011 Clean up for opensource. <wsong83@gmail.com>
*/
 
module AnaProc ()
//
// The foreign attribute string value must be a SystemC value.
//
(* integer foreign = "SystemC";
*);
//
// Verilog port names must match port names exactly as they appear in the
// sc_module class in SystemC; they must also match in order, mode, and type.
//
endmodule
/pdu_def.h
18,6 → 18,7
21/09/2010 Support VC and use templates. <wsong83@gmail.com>
19/11/2010 Fixed to support the minimal 8bit VC. <wsong83@gmail.com>
27/05/2011 Clean up for opensource. <wsong83@gmail.com>
30/05/2011 Clear the addresses field when clear a flit. <wsong83@gmail.com>
*/
 
99,6 → 100,8
vcn = 0;
prio = 0;
ftype = F_IDLE;
addrx = 0;
addry = 0;
for(unsigned int i=0; i<BW; i++) data[i] = 0;
}
 
/procelem.h
13,7 → 13,7
History:
26/02/2011 Initial version. <wsong83@gmail.com>
28/05/2011 Clean up for opensource. <wsong83@gmail.com>
30/05/2011 Clean up for opensource. <wsong83@gmail.com>
*/
 
20,13 → 20,13
#ifndef PROCELEM_H_
#define PROCELEM_H_
 
#include "noc_define.h"
#include "define.h"
#include <systemc.h>
 
 
// a function to generate random numbers comply with an exponential distribution with expection exp
double rand_exp(double exp) {
unsigned int rint = rand()%1e6;
double rand_exponential(double exp) {
unsigned int rint = rand() % (unsigned int)(1e6);
double rdat = rint * 1.0 / 1e6;
return (-1 * exp * log(rint));
}

powered by: WebSVN 2.1.0

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