URL
https://opencores.org/ocsvn/async_sdm_noc/async_sdm_noc/trunk
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 32 |
Rev 33 |
Line 11... |
Line 11... |
|
|
The SystemC processing element.
|
The SystemC processing element.
|
|
|
History:
|
History:
|
26/02/2011 Initial version. <wsong83@gmail.com>
|
26/02/2011 Initial version. <wsong83@gmail.com>
|
30/05/2011 Clean up for opensource. <wsong83@gmail.com>
|
31/05/2011 Clean up for opensource. <wsong83@gmail.com>
|
|
|
*/
|
*/
|
|
|
#ifndef PROCELEM_H_
|
#ifndef PROCELEM_H_
|
#define PROCELEM_H_
|
#define PROCELEM_H_
|
Line 26... |
Line 26... |
|
|
// a function to generate random numbers comply with an exponential distribution with expection exp
|
// a function to generate random numbers comply with an exponential distribution with expection exp
|
double rand_exponential(double exp) {
|
double rand_exponential(double exp) {
|
unsigned int rint = rand() % (unsigned int)(1e6);
|
unsigned int rint = rand() % (unsigned int)(1e6);
|
double rdat = rint * 1.0 / 1e6;
|
double rdat = rint * 1.0 / 1e6;
|
return (-1 * exp * log(rint));
|
return (-1.0 * exp * log(rdat));
|
}
|
}
|
|
|
class ProcElem : public sc_module {
|
class ProcElem : public sc_module {
|
|
|
public:
|
public:
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.