applies clang-format

This commit is contained in:
2024-12-18 17:36:16 +01:00
parent a0bd767bc9
commit f8f1f2f54c
4 changed files with 19 additions and 25 deletions

View File

@@ -22,7 +22,7 @@ template <unsigned WIDTH, typename STATE> unsigned run_scenario(STATE& state) {
auto run1 = sc_spawn([&dut, &state]() {
auto burst_cnt{0};
for(auto size:state.packet_sizes) {
for(auto size : state.packet_sizes) {
cxs_pkt_shared_ptr tx_pkt = cxs_pkt_mm::get().allocate();
tx_pkt->get_data().resize(size);
auto phase{tlm::nw::REQUEST};
@@ -30,16 +30,16 @@ template <unsigned WIDTH, typename STATE> unsigned run_scenario(STATE& state) {
auto status = dut.isck->nb_transport_fw(*tx_pkt, phase, t);
REQUIRE(status == tlm::TLM_UPDATED);
REQUIRE(phase == tlm::nw::CONFIRM);
if(++burst_cnt==state.granularity) {
if(++burst_cnt == state.granularity) {
wait(dut.recv.data_written_event());
while(!dut.recv.empty()) {
auto recv_pkt = dut.recv.front();
dut.recv.pop_front();
REQUIRE(tx_pkt==recv_pkt);
REQUIRE(recv_pkt->get_data().size()==state.packet_sizes[state.resp_cnt]);
REQUIRE(tx_pkt == recv_pkt);
REQUIRE(recv_pkt->get_data().size() == state.packet_sizes[state.resp_cnt]);
state.resp_cnt++;
}
burst_cnt=0;
burst_cnt = 0;
}
}
});
@@ -53,10 +53,8 @@ template <unsigned WIDTH, typename STATE> unsigned run_scenario(STATE& state) {
return cycles;
}
template <typename STATE>
unsigned run_scenario(int width, STATE &state)
{
switch (width) {
template <typename STATE> unsigned run_scenario(int width, STATE& state) {
switch(width) {
case 8:
case 256:
return run_scenario<256>(state);
@@ -79,9 +77,8 @@ TEST_CASE("single-packet", "[CXS][tlm-level]") {
unsigned resp_cnt{0};
} state;
state.packet_sizes.assign({4, 8, 16, 32, 64, 128, 256, 1024});
for(auto width=8; width<11; ++width) {
for(auto width = 8; width < 11; ++width) {
state.resp_cnt = 0;
auto cycles = run_scenario(width, state);