Revise top tests

This commit is contained in:
Rob Bocchino 2025-12-05 08:20:44 -08:00
parent f26251c8a4
commit c412602891
14 changed files with 178 additions and 3 deletions

View File

@ -0,0 +1,5 @@
#!/bin/sh -e
. ../check_topology.sh
check_topology

View File

@ -2,10 +2,8 @@
cd `dirname $0`
. ./check_topology.sh
for dir in `find . -mindepth 1 -type d`
do
echo "checking $dir"
(cd $dir; check_topology)
(cd $dir;./check)
done

View File

@ -0,0 +1,5 @@
#!/bin/sh -e
. ../check_topology.sh
check_topology

View File

@ -0,0 +1,5 @@
#!/bin/sh -e
. ../check_topology.sh
check_topology

View File

@ -0,0 +1,34 @@
#ifndef M_NoParams_HPP
#define M_NoParams_HPP
#include "NoParamsComponentAc.hpp"
namespace M {
class NoParams :
public NoParamsComponentBase
{
public:
NoParams(const char* name) {
}
void init(U32 instanceId) {
}
void regParamsSpecial() {
}
void NoParams_cmdHandler(FwOpcodeType opCode, U32 cmdSeq) {
}
};
}
#endif

View File

@ -0,0 +1,5 @@
#!/bin/sh -e
. ../check_topology.sh
check_topology

View File

@ -0,0 +1,5 @@
#!/bin/sh -e
. ../check_topology.sh
check_topology

View File

@ -0,0 +1,5 @@
#!/bin/sh -e
. ../check_topology.sh
check_topology

View File

@ -0,0 +1,5 @@
#!/bin/sh -e
. ../check_topology.sh
check_topology

View File

@ -0,0 +1,5 @@
#!/bin/sh -e
. ../check_topology.sh
check_topology

View File

@ -22,6 +22,12 @@ namespace M {
}
namespace M {
M::NoParams c3(FW_OPTIONAL_NAME("c3"));
}
namespace M {
// ----------------------------------------------------------------------
@ -31,6 +37,7 @@ namespace M {
void initComponents(const TopologyState& state) {
M::c1.init(InstanceIds::M_c1);
M::c2.init(InstanceIds::M_c2);
M::c3.init(InstanceIds::M_c3);
}
void configComponents(const TopologyState& state) {
@ -40,6 +47,7 @@ namespace M {
void setBaseIds() {
M::c1.setIdBase(BaseIds::M_c1);
M::c2.setIdBase(BaseIds::M_c2);
M::c3.setIdBase(BaseIds::M_c3);
}
void connectComponents() {
@ -247,4 +255,72 @@ namespace M {
}
namespace M {
bool NoParamsComponentBase::isConnected_cmdRegOut_OutputPort(FwIndexType portNum) const {
FW_ASSERT(
(0 <= portNum) && (portNum < NUM_CMDREGOUT_OUTPUT_PORTS),
static_cast<FwAssertArgType>(portNum),
static_cast<FwAssertArgType>(NUM_CMDREGOUT_OUTPUT_PORTS)
);
bool result = false;
const auto instance = this->getInstance();
switch (instance) {
default:
FW_ASSERT(0, static_cast<FwAssertArgType>(instance));
break;
}
return result;
}
bool NoParamsComponentBase::isConnected_cmdResponseIn_OutputPort(FwIndexType portNum) const {
FW_ASSERT(
(0 <= portNum) && (portNum < NUM_CMDRESPONSEIN_OUTPUT_PORTS),
static_cast<FwAssertArgType>(portNum),
static_cast<FwAssertArgType>(NUM_CMDRESPONSEIN_OUTPUT_PORTS)
);
bool result = false;
const auto instance = this->getInstance();
switch (instance) {
default:
FW_ASSERT(0, static_cast<FwAssertArgType>(instance));
break;
}
return result;
}
bool NoParamsComponentBase::isConnected_prmGetOut_OutputPort(FwIndexType portNum) const {
FW_ASSERT(
(0 <= portNum) && (portNum < NUM_PRMGETOUT_OUTPUT_PORTS),
static_cast<FwAssertArgType>(portNum),
static_cast<FwAssertArgType>(NUM_PRMGETOUT_OUTPUT_PORTS)
);
bool result = false;
const auto instance = this->getInstance();
switch (instance) {
default:
FW_ASSERT(0, static_cast<FwAssertArgType>(instance));
break;
}
return result;
}
bool NoParamsComponentBase::isConnected_prmSetOut_OutputPort(FwIndexType portNum) const {
FW_ASSERT(
(0 <= portNum) && (portNum < NUM_PRMSETOUT_OUTPUT_PORTS),
static_cast<FwAssertArgType>(portNum),
static_cast<FwAssertArgType>(NUM_PRMSETOUT_OUTPUT_PORTS)
);
bool result = false;
const auto instance = this->getInstance();
switch (instance) {
default:
FW_ASSERT(0, static_cast<FwAssertArgType>(instance));
break;
}
return result;
}
}
#endif

View File

@ -8,6 +8,7 @@
#define M_ParamsTopologyAc_HPP
#include "C.hpp"
#include "NoParams.hpp"
#include "ParamsTopologyDefs.hpp"
// ----------------------------------------------------------------------
@ -28,6 +29,13 @@ namespace M {
}
namespace M {
//! c3
extern M::NoParams c3;
}
namespace M {
// ----------------------------------------------------------------------
@ -38,6 +46,7 @@ namespace M {
enum {
M_c1 = 0x100,
M_c2 = 0x200,
M_c3 = 0x300,
};
}
@ -45,6 +54,7 @@ namespace M {
enum {
M_c1,
M_c2,
M_c3,
};
}

View File

@ -16,4 +16,18 @@ module M {
}
passive component NoParams {
command recv port cmdOut
command reg port cmdRegOut
command resp port cmdResponseIn
param get port prmGetOut
param set port prmSetOut
}
}

View File

@ -14,10 +14,13 @@ module M {
instance c2: C base id 0x200
instance c3: NoParams base id 0x300
topology Params {
instance c1
instance c2
instance c3
}