Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • shivaraj.kandhasamy/advligorts
  • gerritkuehn/advligorts
  • ezekiel.dohmen/advligorts
  • michael.thomas/advligorts
  • christopher.wipf/advligorts
  • erik.vonreis/advligorts
  • keith-thorne/advligorts
  • jonathan-hanks/advligorts
  • jameson.rollins/advligorts
  • rolf.bork/advligorts
  • cds/software/advligorts
11 results
Show changes
Commits on Source (10)
......@@ -18,6 +18,10 @@ set(LIB_NAME lib${MODEL_NAME})
# Include generated FLAGS, options and INC dirs.
include(${CMAKE_CURRENT_SOURCE_DIR}/UserspaceVars.cmake)
if(${LIGO_INLINE})
list(APPEND CFLAGS "-DLIGO_INLINE=${LIGO_INLINE}")
endif()
if(${USE_STDLIB_MATH})
list(APPEND CFLAGS "-DUSE_STDLIB_MATH=1")
endif()
......
......@@ -29,6 +29,19 @@ require "lib/Dac20.pm";
#//
#// Remaining arguments listed in code are optional and not normally used by RCG Makefile. \n\n
#// Environment Vars
#// Required:
#// RCG_SRC_DIR : The current advligorts src directory that shoudl be used by the build. This is set
#// by the top level Makefile when calling rtcds build.
#// PERL5LIB : This is set by the top level Makefile so that these scrips can find cdsParts
#//
#// Optional:
#// SIMULATION_BUILD : Warning this should not be set in production systems. This argument enables the generation
#// of IPC entries from IPC RECEIVER parts. This is used by librts so it can build models
#// with IPC receivers, that have senders from other models.
#//
#//
# Normal call from Makefile is just first two args.
#//
......@@ -362,6 +375,19 @@ for ($ii = 0; $ii < $partCnt; $ii++) {
#// - Process all IPC parts in one go. Requires <em>lib/IPCx.pm</em>, with call to procIpc. \n
require "lib/IPCx.pm";
("CDS::IPCx::procIpc") -> ($partCnt);
if(defined $ENV{'SIMULATION_BUILD'})
{
# When in simulation build receivers are added to the IPC file
# But we need to reprocess so we can load their info
$ipcxCnt = 0; # === IPCx ===
$ipcxDeclDone = 0; # === IPCx ===
$ipcxInitDone = 0; # === IPCx ===
$ipcxBlockTags[0] = undef;
$ipcxParts[0][0] = undef;
$ipcxTagCount = 0;
$ipcxReset = "";
("CDS::IPCx::procIpc") -> ($partCnt);
}
#// - Check that all subsystem INPUT parts are connected; else exit w/error. \n
......@@ -1173,6 +1199,19 @@ print OUTH "#include \"drv/cdsHardware.h\"\n";
$totalCardCount = $adcCnt + $dacCnt + $boCnt;
print OUTH "extern CDS_CARDS cards_used[" . $totalCardCount . "];\n\n";
print OUTH "#include \"commData3.h\"\n";
print OUTH "#define MODEL_NUM_IPCS_USED $::ipcxCnt\n";
if ( $::ipcxCnt == 0)
{
print OUTH "extern CDS_IPC_INFO ipcInfo[1];\n\n";
}
else
{
print OUTH "extern CDS_IPC_INFO ipcInfo[$::ipcxCnt];\n\n";
}
print OUTH "typedef struct CDS_EPICS_IN {\n";
print OUTH "\tint vmeReset;\n";
print EPICS "MOMENTARY FEC\_$dcuId\_VME_RESET epicsInput.vmeReset int ao 0\n";
......
......@@ -110,7 +110,7 @@ sub printFrontEndVars {
print ::OUT "#define COMMDATA_INLINE\n";
print ::OUT "#include \"commData3.h\"\n";
print ::OUT "static int myIpcCount;\n";
print ::OUT "static CDS_IPC_INFO ipcInfo[$::ipcxCnt];\n\n";
print ::OUT "CDS_IPC_INFO ipcInfo[$::ipcxCnt];\n\n";
}
}
......@@ -144,7 +144,7 @@ sub frontEndInitCode {
for ($l = 0; $l < $::ipcxCnt; $l++) {
if ($::ipcxParts[$l][6] == $i) {
$found = 1;
if ( ($::ipcxParts[$l][7] =~ /^Ground/) || ($::ipcxParts[$l][7] =~ /\_Ground/) ) {
$calcExp .= "ipcInfo[$::ipcxInitDone]\.mode = IRCV;\n";
}
......@@ -570,8 +570,16 @@ $ipcxRcvrCnt = 0;
$kk = $::ipcxParts[$ii][6];
if ( ($::partInput[$kk][0] =~ /^Ground/) || ($::partInput[$kk][0] =~ /\_Ground/) ) {
$ipcxAdd[$ipcxNotFound][1] = 2;
$ipcxRcvrCnt++;
if(defined $ENV{'SIMULATION_BUILD'})
{
$ipcxAdd[$ipcxNotFound][1] = 1;
}
else
{
$ipcxAdd[$ipcxNotFound][1] = 2;
$ipcxRcvrCnt++;
}
}
else {
if ($::partOutCnt[$kk] != 0) {
......
......@@ -40,7 +40,7 @@ attach_shared_memory( const char* sysname )
g_epics_shm_handle = shmem_open(sysname_lower, SHMEM_EPICS_SIZE_MB);
if ( g_epics_shm_handle == NULL )
{
printl( "shmem_open(%s, %d) failed; ret = %d\n",
printl( "shmem_open(%s, %d) failed; ret = %p\n",
sysname, SHMEM_EPICS_SIZE_MB, g_epics_shm_handle );
return -1;
}
......@@ -52,7 +52,7 @@ attach_shared_memory( const char* sysname )
g_tp_shm_handle = shmem_open(shm_name, SHMEM_TESTPOINT_SIZE_MB);
if ( g_tp_shm_handle == NULL )
{
printl( "shmem_open(%s, %d) failed; ret = %d\n",
printl( "shmem_open(%s, %d) failed; ret = %p\n",
shm_name, SHMEM_TESTPOINT_SIZE_MB, g_tp_shm_handle );
return -1;
}
......@@ -64,7 +64,7 @@ attach_shared_memory( const char* sysname )
g_awg_shm_handle = shmem_open(shm_name, SHMEM_AWG_SIZE_MB);
if ( g_awg_shm_handle == NULL )
{
printl( "shmem_open(%s, %d) failed; ret = %d\n",
printl( "shmem_open(%s, %d) failed; ret = %p\n",
shm_name, SHMEM_AWG_SIZE_MB, g_awg_shm_handle );
return -1;
}
......@@ -75,7 +75,7 @@ attach_shared_memory( const char* sysname )
g_ipc_shm_handle = shmem_open( SHMEM_IOMEM_NAME, SHMEM_IOMEM_SIZE_MB);
if ( g_ipc_shm_handle == NULL )
{
printl( "shmem_open(%s, %d) failed; ret = %d\n",
printl( "shmem_open(%s, %d) failed; ret = %p\n",
SHMEM_IOMEM_NAME, SHMEM_IOMEM_SIZE_MB, g_ipc_shm_handle );
return -1;
}
......@@ -90,7 +90,7 @@ attach_shared_memory( const char* sysname )
g_daq_shm_handle = shmem_open(shm_name, DEFAULT_SHMEM_ALLOC_SIZE_MB);
if ( g_daq_shm_handle == NULL )
{
printl( "shmem_open(%s, %d) failed; ret = %d\n",
printl( "shmem_open(%s, %d) failed; ret = %p\n",
shm_name, DEFAULT_SHMEM_ALLOC_SIZE_MB, g_daq_shm_handle );
return -1;
}
......@@ -102,7 +102,7 @@ attach_shared_memory( const char* sysname )
g_shmipc_shm_handle = shmem_open(SHMEM_IPCCOMMS_NAME, SHMEM_IPCCOMMS_SIZE_MB);
if ( g_shmipc_shm_handle == NULL )
{
printl( "shmem_open(%s, %d) failed; ret = %d\n",
printl( "shmem_open(%s, %d) failed; ret = %p\n",
SHMEM_IPCCOMMS_NAME, SHMEM_IPCCOMMS_SIZE_MB, g_shmipc_shm_handle );
return -1;
}
......@@ -112,7 +112,7 @@ attach_shared_memory( const char* sysname )
g_io_shm_handle = shmem_open("virtual_io_space", DEFAULT_SHMEM_ALLOC_SIZE_MB);
if ( g_io_shm_handle == NULL )
{
printl( "shmem_open(%s, %d) failed; ret = %d\n",
printl( "shmem_open(%s, %d) failed; ret = %p\n",
"virtual_io_space", DEFAULT_SHMEM_ALLOC_SIZE_MB, g_io_shm_handle );
return -1;
}
......