Skip to content

Commit

Permalink
Modify the record names to match the LNLS Naming System.
Browse files Browse the repository at this point in the history
The sensor names are chosen based on NAT MCH CLI ones.
Additionally, replaced the generic 'P' and 'R' PV prefixes used in some
IOCs with 'AREA' and 'DIS' to improve consistency and readability.
  • Loading branch information
gustavosr8 committed Sep 20, 2024
1 parent 855ceaa commit a3f6131
Show file tree
Hide file tree
Showing 20 changed files with 630 additions and 243 deletions.
405 changes: 405 additions & 0 deletions PVList.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Status](https://github.com/lnls-dig/ipmi-mgr-epics-ioc/actions/workflows/build.y
This repository contains the EPICS Input/Output Controller (IOC) used at LNLS
for managing uTCA crates, based on
[ipmiComm](https://github.com/slac-epics-modules/ipmiComm) support module.
The available PVs are listed [here](PVList.md).

## Running the IOC

Expand Down
3 changes: 1 addition & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,5 @@ services:
REPONAME: ipmi-mgr-epics-ioc
RUNDIR: /opt/ipmi-mgr-epics-ioc/iocBoot/iocIpmiMgr
environment:
P: ${P}
R: ${R}
AREA: ${AREA}
IPADDR: ${IPADDR}
4 changes: 2 additions & 2 deletions iocBoot/iocIpmiMgr/st.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ drvAsynIPPortConfigure ("$(PORT)","$(IPADDR):623 udp",0,0,0)
mchInit("$(PORT)")

## Load record instances
dbLoadRecords("$(TOP)/db/asynRecord.db","P=${P}, R=${R}:asyn,PORT=$(PORT),ADDR=0,OMAX=80,IMAX=80")
dbLoadRecords("${TOP}/db/microtca_bpm_crate.db", "link=$(PORT),P=$(P),R=$(R):,dev=$(P)$(R),unit=''")
dbLoadRecords("$(TOP)/db/asynRecord.db","P=${AREA}:, R=CO-MCH_Base:asyn,PORT=$(PORT),ADDR=0,OMAX=80,IMAX=80")
dbLoadRecords("${TOP}/db/microtca_bpm_crate.db", "link=$(PORT),AREA=$(AREA):,DIS='CO-',id='',prefix='',unit=''")

# < save_restore.cmd

Expand Down
44 changes: 22 additions & 22 deletions ipmiMgrApp/Db/afcv3.substitutions
Original file line number Diff line number Diff line change
Expand Up @@ -29,34 +29,34 @@

file "fru_common_alias.db"
{
pattern { id , fruid }
{ $(id) , $(fruid) }
pattern { dev , fruid }
{ $(dev), $(fruid) }
}

file "power_mngr.db"
{
pattern { id , power_channel }
{ $(id) , $(power_channel) }
pattern { dev , power_channel }
{ $(dev), $(power_channel) }
}

file "sensor_ai_alias.db"
{
pattern { attr , sensinst , type , fruid , prefix , aliasprefix }
{ FMC1Volt12V , 1 , 2 , $(fruid) , $(id) , alias_$(id) }
{ FMC1VoltVADJ , 2 , 2 , $(fruid) , $(id) , alias_$(id) }
{ FMC1Volt3V3 , 3 , 2 , $(fruid) , $(id) , alias_$(id) }
{ FMC2Volt12V , 4 , 2 , $(fruid) , $(id) , alias_$(id) }
{ FMC2VoltVADJ , 5 , 2 , $(fruid) , $(id) , alias_$(id) }
{ FMC2Volt3V3 , 6 , 2 , $(fruid) , $(id) , alias_$(id) }
{ FMC1Curr12V , 1 , 3 , $(fruid) , $(id) , alias_$(id) }
{ FMC1CurrVADJ , 2 , 3 , $(fruid) , $(id) , alias_$(id) }
{ FMC1Curr3V3 , 3 , 3 , $(fruid) , $(id) , alias_$(id) }
{ FMC2Curr12V , 4 , 3 , $(fruid) , $(id) , alias_$(id) }
{ FMC2CurrVADJ , 5 , 3 , $(fruid) , $(id) , alias_$(id) }
{ FMC2Curr3V3 , 6 , 3 , $(fruid) , $(id) , alias_$(id) }
{ TempFPGA , 1 , 1 , $(fruid) , $(id) , alias_$(id) }
{ TempUC , 2 , 1 , $(fruid) , $(id) , alias_$(id) }
{ TempClkSwitch , 3 , 1 , $(fruid) , $(id) , alias_$(id) }
{ TempDCDC , 4 , 1 , $(fruid) , $(id) , alias_$(id) }
{ TempRAM , 5 , 1 , $(fruid) , $(id) , alias_$(id) }
pattern { attr , sensinst, type, fruid , aliasprefix , dev }
{ FMC1Volt12V , 1 , 2 , $(fruid), alias_$(dev), $(dev) }
{ FMC1VoltVADJ , 2 , 2 , $(fruid), alias_$(dev), $(dev) }
{ FMC1Volt3V3 , 3 , 2 , $(fruid), alias_$(dev), $(dev) }
{ FMC2Volt12V , 4 , 2 , $(fruid), alias_$(dev), $(dev) }
{ FMC2VoltVADJ , 5 , 2 , $(fruid), alias_$(dev), $(dev) }
{ FMC2Volt3V3 , 6 , 2 , $(fruid), alias_$(dev), $(dev) }
{ FMC1Curr12V , 1 , 3 , $(fruid), alias_$(dev), $(dev) }
{ FMC1CurrVADJ , 2 , 3 , $(fruid), alias_$(dev), $(dev) }
{ FMC1Curr3V3 , 3 , 3 , $(fruid), alias_$(dev), $(dev) }
{ FMC2Curr12V , 4 , 3 , $(fruid), alias_$(dev), $(dev) }
{ FMC2CurrVADJ , 5 , 3 , $(fruid), alias_$(dev), $(dev) }
{ FMC2Curr3V3 , 6 , 3 , $(fruid), alias_$(dev), $(dev) }
{ TempFPGA , 1 , 1 , $(fruid), alias_$(dev), $(dev) }
{ TempUC , 2 , 1 , $(fruid), alias_$(dev), $(dev) }
{ TempClkSwitch, 3 , 1 , $(fruid), alias_$(dev), $(dev) }
{ TempDCDC , 4 , 1 , $(fruid), alias_$(dev), $(dev) }
{ TempRAM , 5 , 1 , $(fruid), alias_$(dev), $(dev) }
}
52 changes: 26 additions & 26 deletions ipmiMgrApp/Db/afcv4.substitutions
Original file line number Diff line number Diff line change
Expand Up @@ -31,38 +31,38 @@

file "fru_common_alias.db"
{
pattern { id , fruid }
{ $(id) , $(fruid) }
pattern { dev , fruid }
{ $(dev), $(fruid)}
}

file "power_mngr.db"
{
pattern { id , power_channel }
{ $(id) , $(power_channel) }
pattern { dev , power_channel }
{ $(dev), $(power_channel)}
}

file "sensor_ai_alias.db"
{
pattern { attr , sensinst , type , fruid , prefix , aliasprefix }
{ AMCVolt12V , 1 , 2 , $(fruid) , $(id) , alias_$(id) }
{ RTMVolt12V , 2 , 2 , $(fruid) , $(id) , alias_$(id) }
{ FMC1Volt12V , 3 , 2 , $(fruid) , $(id) , alias_$(id) }
{ FMC1VoltVADJ , 4 , 2 , $(fruid) , $(id) , alias_$(id) }
{ FMC1Volt3V3 , 5 , 2 , $(fruid) , $(id) , alias_$(id) }
{ FMC2Volt12V , 6 , 2 , $(fruid) , $(id) , alias_$(id) }
{ FMC2VoltVADJ , 7 , 2 , $(fruid) , $(id) , alias_$(id) }
{ FMC2Volt3V3 , 8 , 2 , $(fruid) , $(id) , alias_$(id) }
{ AMCCurr12V , 1 , 3 , $(fruid) , $(id) , alias_$(id) }
{ RTMCurr12V , 2 , 3 , $(fruid) , $(id) , alias_$(id) }
{ FMC1Curr12V , 3 , 3 , $(fruid) , $(id) , alias_$(id) }
{ FMC1CurrVADJ , 4 , 3 , $(fruid) , $(id) , alias_$(id) }
{ FMC1Curr3V3 , 5 , 3 , $(fruid) , $(id) , alias_$(id) }
{ FMC2Curr12V , 6 , 3 , $(fruid) , $(id) , alias_$(id) }
{ FMC2CurrVADJ , 7 , 3 , $(fruid) , $(id) , alias_$(id) }
{ FMC2Curr3V3 , 8 , 3 , $(fruid) , $(id) , alias_$(id) }
{ TempFPGA , 1 , 1 , $(fruid) , $(id) , alias_$(id) }
{ TempUC , 2 , 1 , $(fruid) , $(id) , alias_$(id) }
{ TempClkSwitch , 3 , 1 , $(fruid) , $(id) , alias_$(id) }
{ TempDCDC , 4 , 1 , $(fruid) , $(id) , alias_$(id) }
{ TempRAM , 5 , 1 , $(fruid) , $(id) , alias_$(id) }
pattern { attr , sensinst, type, fruid , aliasprefix , dev }
{ AMCVolt12V , 1 , 2 , $(fruid), alias_$(dev), $(dev) }
{ RTMVolt12V , 2 , 2 , $(fruid), alias_$(dev), $(dev) }
{ FMC1Volt12V , 3 , 2 , $(fruid), alias_$(dev), $(dev) }
{ FMC1VoltVADJ , 4 , 2 , $(fruid), alias_$(dev), $(dev) }
{ FMC1Volt3V3 , 5 , 2 , $(fruid), alias_$(dev), $(dev) }
{ FMC2Volt12V , 6 , 2 , $(fruid), alias_$(dev), $(dev) }
{ FMC2VoltVADJ , 7 , 2 , $(fruid), alias_$(dev), $(dev) }
{ FMC2Volt3V3 , 8 , 2 , $(fruid), alias_$(dev), $(dev) }
{ AMCCurr12V , 1 , 3 , $(fruid), alias_$(dev), $(dev) }
{ RTMCurr12V , 2 , 3 , $(fruid), alias_$(dev), $(dev) }
{ FMC1Curr12V , 3 , 3 , $(fruid), alias_$(dev), $(dev) }
{ FMC1CurrVADJ , 4 , 3 , $(fruid), alias_$(dev), $(dev) }
{ FMC1Curr3V3 , 5 , 3 , $(fruid), alias_$(dev), $(dev) }
{ FMC2Curr12V , 6 , 3 , $(fruid), alias_$(dev), $(dev) }
{ FMC2CurrVADJ , 7 , 3 , $(fruid), alias_$(dev), $(dev) }
{ FMC2Curr3V3 , 8 , 3 , $(fruid), alias_$(dev), $(dev) }
{ TempFPGA , 1 , 1 , $(fruid), alias_$(dev), $(dev) }
{ TempUC , 2 , 1 , $(fruid), alias_$(dev), $(dev) }
{ TempClkSwitch, 3 , 1 , $(fruid), alias_$(dev), $(dev) }
{ TempDCDC , 4 , 1 , $(fruid), alias_$(dev), $(dev) }
{ TempRAM , 5 , 1 , $(fruid), alias_$(dev), $(dev) }
}
32 changes: 16 additions & 16 deletions ipmiMgrApp/Db/cooling_unit.substitutions
Original file line number Diff line number Diff line change
Expand Up @@ -25,28 +25,28 @@

file "fru_common_alias.db"
{
pattern { id , fruid }
{ $(id) , $(fruid) }
pattern { dev , fruid }
{ $(dev), $(fruid) }
}

file "power_mngr.db"
{
pattern { id , power_channel }
{ $(id) , $(power_channel) }
pattern { dev , power_channel }
{ $(dev), $(power_channel) }
}

file "sensor_ai_alias.db"
{
pattern { attr , sensinst , type , fruid , prefix , aliasprefix }
{ LM75Temp1 , 1 , 1 , $(fruid) , $(id) , alias_$(id) }
{ LM75Temp2 , 2 , 1 , $(fruid) , $(id) , alias_$(id) }
{ 3V3 , 1 , 2 , $(fruid) , $(id) , alias_$(id) }
{ 12V , 2 , 2 , $(fruid) , $(id) , alias_$(id) }
{ 12V_1 , 3 , 2 , $(fruid) , $(id) , alias_$(id) }
{ Fan1 , 1 , 4 , $(fruid) , $(id) , alias_$(id) }
{ Fan2 , 2 , 4 , $(fruid) , $(id) , alias_$(id) }
{ Fan3 , 3 , 4 , $(fruid) , $(id) , alias_$(id) }
{ Fan4 , 4 , 4 , $(fruid) , $(id) , alias_$(id) }
{ Fan5 , 5 , 4 , $(fruid) , $(id) , alias_$(id) }
{ Fan6 , 6 , 4 , $(fruid) , $(id) , alias_$(id) }
pattern { attr , sensinst, type, fruid , aliasprefix , dev }
{ TempLM75 , 1 , 1 , $(fruid), alias_$(dev), $(dev) }
{ TempLM75_2, 2 , 1 , $(fruid), alias_$(dev), $(dev) }
{ Volt3V3 , 1 , 2 , $(fruid), alias_$(dev), $(dev) }
{ Volt12V , 2 , 2 , $(fruid), alias_$(dev), $(dev) }
{ Volt12V_1 , 3 , 2 , $(fruid), alias_$(dev), $(dev) }
{ SFan1 , 1 , 4 , $(fruid), alias_$(dev), $(dev) }
{ SFan2 , 2 , 4 , $(fruid), alias_$(dev), $(dev) }
{ SFan3 , 3 , 4 , $(fruid), alias_$(dev), $(dev) }
{ SFan4 , 4 , 4 , $(fruid), alias_$(dev), $(dev) }
{ SFan5 , 5 , 4 , $(fruid), alias_$(dev), $(dev) }
{ SFan6 , 6 , 4 , $(fruid), alias_$(dev), $(dev) }
}
48 changes: 19 additions & 29 deletions ipmiMgrApp/Db/fru_common_alias.template
Original file line number Diff line number Diff line change
@@ -1,55 +1,45 @@
include "fru_common.db"

alias("$(dev):$(id)$(unit):P", "$(P)$(R)$(id)Prs-Sts")

alias("$(dev):$(id)$(unit):FRUID", "$(P)$(R)$(id)FruId-Cte")

alias("$(dev):$(id)$(unit):BMANUF", "$(P)$(R)$(id)BoardManuf-Cte")

alias("$(dev):$(id)$(unit):BPRODNAME", "$(P)$(R)$(id)BoardName-Cte")

alias("$(dev):$(id)$(unit):BSN", "$(P)$(R)$(id)BoardSN-Cte")

alias("$(dev):$(id)$(unit):BPARTNUMBER", "$(P)$(R)$(id)BoardPN-Cte")

alias("$(dev):$(id)$(unit):PMANUF", "$(P)$(R)$(id)ProdManuf-Cte")

alias("$(dev):$(id)$(unit):PPRODNAME", "$(P)$(R)$(id)ProdName-Cte")

alias("$(dev):$(id)$(unit):PSN", "$(P)$(R)$(id)ProdSN-Cte")

alias("$(dev):$(id)$(unit):PPARTNUMBER", "$(P)$(R)$(id)ProdPN-Cte")

alias("$(dev):$(id)$(unit):POWERCTL", "$(P)$(R)$(id)PowerCtl-Sel")

record(sseq, "$(P)$(R)$(id)SoftRst-Cmd") {
alias("$(dev):$(id)$(unit):P", "$(AREA)$(DIS)$(dev):Status-Cte")
alias("$(dev):$(id)$(unit):FRUID", "$(AREA)$(DIS)$(dev):FruId-Cte")
alias("$(dev):$(id)$(unit):BMANUF", "$(AREA)$(DIS)$(dev):BoardManuf-Cte")
alias("$(dev):$(id)$(unit):BPRODNAME", "$(AREA)$(DIS)$(dev):BoardName-Cte")
alias("$(dev):$(id)$(unit):BSN", "$(AREA)$(DIS)$(dev):BoardSN-Cte")
alias("$(dev):$(id)$(unit):BPARTNUMBER", "$(AREA)$(DIS)$(dev):BoardPN-Cte")
alias("$(dev):$(id)$(unit):PMANUF", "$(AREA)$(DIS)$(dev):ProdManuf-Cte")
alias("$(dev):$(id)$(unit):PPRODNAME", "$(AREA)$(DIS)$(dev):ProdName-Cte")
alias("$(dev):$(id)$(unit):PSN", "$(AREA)$(DIS)$(dev):ProdSN-Cte")
alias("$(dev):$(id)$(unit):PPARTNUMBER", "$(AREA)$(DIS)$(dev):ProdPN-Cte")
alias("$(dev):$(id)$(unit):POWERCTL", "$(AREA)$(DIS)$(dev):PowerCtl-Sel")

record(sseq, "$(AREA)$(DIS)$(dev):SoftRst-Cmd") {
field(DESC, "Power cycle system")
field(SELM, "All")
field(PINI, "NO")
#Set 'Restarting' State
field(LNK1, "$(P)$(R)$(id)SoftRstSts-Mon CA")
field(LNK1, "$(AREA)$(DIS)$(dev):SoftRstSts-Mon CA")
field(DO1, "1")
field(WAIT1, "Wait")
#Send a shutdown command
field(LNK2, "$(P)$(R)$(id)PowerCtl-Sel CA")
field(LNK2, "$(AREA)$(DIS)$(dev):PowerCtl-Sel CA")
field(DO2, "0")
field(WAIT2, "Wait")
#Set 'Waiting for Power On' state
field(LNK3, "$(P)$(R)$(id)SoftRstSts-Mon CA")
field(LNK3, "$(AREA)$(DIS)$(dev):SoftRstSts-Mon CA")
field(DO3, "2")
field(WAIT3, "Wait")
#After 15 seconds, send a start command
field(DLY4, "15")
field(LNK4, "$(P)$(R)$(id)PowerCtl-Sel CA")
field(LNK4, "$(AREA)$(DIS)$(dev):PowerCtl-Sel CA")
field(DO4, "1")
field(WAIT4, "Wait")
#After 15 seconds, set 'Idle' state
field(DLY5, "15")
field(LNK5, "$(P)$(R)$(id)SoftRstSts-Mon CA")
field(LNK5, "$(AREA)$(DIS)$(dev):SoftRstSts-Mon CA")
field(DO5, "0")
field(WAIT5, "Wait")
}
record(mbbo, "$(P)$(R)$(id)SoftRstSts-Mon") {
record(mbbo, "$(AREA)$(DIS)$(dev):SoftRstSts-Mon") {
field(DESC, "Fru Power State")
field(ZRST, "Idle")
field(ONST, "Restarting")
Expand Down
24 changes: 12 additions & 12 deletions ipmiMgrApp/Db/mch_base.substitutions
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@

file "fru_common_alias.db"
{
pattern { id , fruid }
{ $(suffix) , $(fruid) }
pattern { dev , fruid }
{ $(dev), $(fruid) }
}

file "sensor_ai_alias.db"
{
pattern { attr , sensinst , type , fruid , prefix , aliasprefix }
{ TempCPU , 1 , 1 , $(fruid) , $(suffix) , alias_$(suffix) }
{ TempIO , 2 , 1 , $(fruid) , $(suffix) , alias_$(suffix) }
{ VoltBA1V2 , 1 , 2 , $(fruid) , $(suffix) , alias_$(suffix) }
{ VoltBA1V5 , 2 , 2 , $(fruid) , $(suffix) , alias_$(suffix) }
{ VoltBA1V8 , 3 , 2 , $(fruid) , $(suffix) , alias_$(suffix) }
{ VoltBA2V5 , 4 , 2 , $(fruid) , $(suffix) , alias_$(suffix) }
{ VoltBA3V3 , 5 , 2 , $(fruid) , $(suffix) , alias_$(suffix) }
{ VoltBA12V , 6 , 2 , $(fruid) , $(suffix) , alias_$(suffix) }
{ Curr , 1 , 3 , $(fruid) , $(suffix) , alias_$(suffix) }
pattern { attr , sensinst, type, fruid , aliasprefix , dev }
{ TempCPU , 1 , 1 , $(fruid), alias_$(dev), $(dev) }
{ TempIO , 2 , 1 , $(fruid), alias_$(dev), $(dev) }
{ VoltBase1V2, 1 , 2 , $(fruid), alias_$(dev), $(dev) }
{ VoltBase1V5, 2 , 2 , $(fruid), alias_$(dev), $(dev) }
{ VoltBase1V8, 3 , 2 , $(fruid), alias_$(dev), $(dev) }
{ VoltBase2V5, 4 , 2 , $(fruid), alias_$(dev), $(dev) }
{ VoltBase3V3, 5 , 2 , $(fruid), alias_$(dev), $(dev) }
{ VoltBase12V, 6 , 2 , $(fruid), alias_$(dev), $(dev) }
{ CurrBase , 1 , 3 , $(fruid), alias_$(dev), $(dev) }
}
18 changes: 9 additions & 9 deletions ipmiMgrApp/Db/mch_clk_switch.substitutions
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@

file "fru_common_alias.db"
{
pattern { id , fruid }
{ $(suffix) , $(fruid) }
pattern { dev , fruid }
{ $(dev), $(fruid) }
}

file "sensor_ai_alias.db"
{
pattern { attr , sensinst , type , fruid , prefix , aliasprefix }
{ DTemp , 1 , 1 , $(fruid) , $(suffix) , alias_$(suffix) }
{ DMaxTemp , 2 , 1 , $(fruid) , $(suffix) , alias_$(suffix) }
{ MTemp , 3 , 1 , $(fruid) , $(suffix) , alias_$(suffix) }
{ MMaxTemp , 4 , 1 , $(fruid) , $(suffix) , alias_$(suffix) }
{ Volt3V3 , 1 , 2 , $(fruid) , $(suffix) , alias_$(suffix) }
{ Volt12V , 2 , 2 , $(fruid) , $(suffix) , alias_$(suffix) }
pattern { attr , sensinst, type, fruid , aliasprefix , dev }
{ TempDCDC , 1 , 1 , $(fruid), alias_$(dev), $(dev) }
{ TempDCDCMax, 2 , 1 , $(fruid), alias_$(dev), $(dev) }
{ TempMux , 3 , 1 , $(fruid), alias_$(dev), $(dev) }
{ TempMuxMax , 4 , 1 , $(fruid), alias_$(dev), $(dev) }
{ Volt3V3 , 1 , 2 , $(fruid), alias_$(dev), $(dev) }
{ Volt12V , 2 , 2 , $(fruid), alias_$(dev), $(dev) }
}
16 changes: 8 additions & 8 deletions ipmiMgrApp/Db/mch_nat.substitutions
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,24 @@

file "mch_base.db"
{
pattern { suffix , fruid }
{ $(id)Base , 3 }
pattern { dev , fruid }
{ $(dev)_Base, 3 }
}

file "mch_clk_switch.db"
{
pattern { suffix , fruid }
{ $(id)ClkSw , 60 }
pattern { dev , fruid }
{ $(dev)_ClkSw, 60 }
}

file "mch_pci_hub.db"
{
pattern { suffix , fruid }
{ $(id)PciHub , 61 }
pattern { dev , fruid }
{ $(dev)_PCI_Hub, 61 }
}

file "rtm_cpu.db"
{
pattern { suffix , fruid }
{ $(id)RtmCpu , 64 }
pattern { dev , fruid }
{ $(dev)_RTM_CPU, 64 }
}
Loading

0 comments on commit a3f6131

Please sign in to comment.