Skip to content

Commit b561085

Browse files
jgavillalobosErickOF
authored andcommitted
Change how the delays of initiator and target are used
1 parent 54e27de commit b561085

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

modules/router/src/img_initiator.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,15 +124,17 @@ struct img_initiator: sc_module
124124
//Transaction Management Variables
125125
tlm::tlm_phase phase;
126126
tlm::tlm_sync_enum status;
127+
tlm::tlm_command cur_command;
127128
img_generic_extension* img_ext;
128129

129130
//Begin Request
130131
phase = tlm::BEGIN_REQ;
131132
transaction->acquire();
132133
transaction->get_extension(img_ext);
134+
cur_command = transaction->get_command();
133135
dbgmodprint("BEGIN_REQ SENT TRANS ID %0d", img_ext->transaction_number);
134136
pending_transaction = transaction;
135-
status = socket->nb_transport_fw(*transaction, phase, this->write_delay); // Non-blocking transport call
137+
status = socket->nb_transport_fw(*transaction, phase, ((cur_command == tlm::TLM_WRITE_COMMAND) ? this->write_delay : this->read_delay)); // Non-blocking transport call
136138

137139
// Check request status returned by target
138140
switch (status) {

modules/router/src/img_target.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ struct img_target: sc_module
8585

8686
//Queue a response
8787
tlm::tlm_phase int_phase = internal_processing_ph;
88-
m_peq.notify(trans, int_phase, response_delay);
88+
m_peq.notify(trans, int_phase, receive_delay);
8989
break;
9090
}
9191
case tlm::END_RESP:

modules/router/src/tb_edge_detector_tlm.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ SC_MODULE(Tb_top)
5151
rgb2gray_DUT = new rgb2gray_tlm("rgb2gray_DUT");
5252

5353
sobel_initiator->start_img_initiators();
54-
sobel_initiator->set_delays(sc_time(10, SC_NS), sc_time(3, SC_NS));
54+
sobel_initiator->set_delays(sc_time(10, SC_NS), sc_time(10, SC_NS));
5555
edge_detector_DUT->set_delays(sc_time(10, SC_NS), sc_time(3, SC_NS));
5656
gray_initiator->start_img_initiators();
5757
gray_initiator->set_delays(sc_time(0, SC_NS), sc_time(0, SC_NS));

0 commit comments

Comments
 (0)