Skip to content

Commit 4e470bb

Browse files
committed
Adding mapping technology params for the DAC
1 parent 68bf28c commit 4e470bb

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

modules/dac/include/dac.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ SCA_TDF_MODULE(dac)
3838
SCA_CTOR(dac) : in("in"), out("out")
3939
{
4040
// Propagation time from input to output
41-
set_timestep(sca_core::sca_time(0.1, sc_core::SC_US));
41+
set_timestep(sca_core::sca_time(17, sc_core::SC_NS));
4242
}
4343

4444
/**

modules/dac/include/seq_item_dac.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ SCA_TDF_MODULE(seq_item_dac)
1717

1818
SCA_CTOR(seq_item_dac)
1919
{
20-
set_timestep(sca_core::sca_time(0.1, sc_core::SC_US));
20+
set_timestep(sca_core::sca_time(17, sc_core::SC_NS));
2121
}
2222

2323
void processing()

modules/dac/src/tb_dac.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
#include "seq_item_dac.hpp"
44

55
#define N 8
6+
#define VOLTAGE_MIN 0
7+
#define VOLTAGE_MAX 3300
68

79

810
int sc_main(int, char*[])
@@ -15,7 +17,7 @@ int sc_main(int, char*[])
1517
sca_tdf::sca_signal<double> s_ana_out;
1618

1719
// DUT
18-
dac<N> ips_dac("ips_dac");
20+
dac<N, VOLTAGE_MIN, VOLTAGE_MAX, VUnit::mv> ips_dac("ips_dac");
1921
ips_dac.in(s_dig);
2022
ips_dac.out(s_ana_out);
2123

@@ -32,7 +34,7 @@ int sc_main(int, char*[])
3234
std::cout << "@" << sc_time_stamp() << std::endl;
3335

3436
// Run test
35-
sc_start(MAX_SEQ_ITEMS * 0.1, SC_US);
37+
sc_start(MAX_SEQ_ITEMS * 30, SC_NS);
3638

3739
// End time
3840
std::cout << "@" << sc_time_stamp() << std::endl;

0 commit comments

Comments
 (0)