Skip to content

Commit

Permalink
Add configurations for VME-EVR300 card
Browse files Browse the repository at this point in the history
  • Loading branch information
rhong authored and gabrielfedel committed May 14, 2024
1 parent 1e14d2d commit 92b8848
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 3 deletions.
27 changes: 25 additions & 2 deletions evrMrmApp/src/drvemSetup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ static const epicsPCIID mrmevrs[] = {

static const struct VMECSRID vmeevrs[] = {
// VME-EVR-230 and VME-EVRRF-230
{MRF_VME_IEEE_OUI, MRF_VME_EVR_RF_BID|MRF_SERIES_230, VMECSRANY}
{MRF_VME_IEEE_OUI, MRF_VME_EVR230RF_BID, VMECSRANY}
// VME-EVR-300
,{MRF_VME_IEEE_OUI, MRF_VME_EVR300_BID, VMECSRANY}
,VMECSR_END
};

Expand Down Expand Up @@ -174,6 +176,21 @@ static const EVRMRM::Config cpci_evr_300 = {
2, // FP inputs
};

//VME EVR
static const EVRMRM::Config vme_evr_300 = {
"VME-EVR-300",
24, // pulse generators
8, // prescalers
0, // FP outputs
10, // FPUV outputs
16, // RB outputs
0, // Backplane outputs
8, // FP Delay outputs
4, // CML/GTX outputs
MRMCML::typeCML,
2, // FP inputs
};

static const EVRMRM::Config mtca_evr_300rf = {
"mTCA-EVR-300RF",
24, // pulse generators
Expand Down Expand Up @@ -831,7 +848,6 @@ mrmEvrSetupVME(const char* id,int slot,int base,int level, int vector)
{
try {
bus_configuration bus;
const EVRMRM::Config *conf = &vme_evrrf_230;

bus.busType = busType_vme;
bus.vme.slot = slot;
Expand All @@ -857,6 +873,13 @@ try {
printf("Found vendor: %08x board: %08x rev.: %08x\n",
info.vendor, info.board, info.revision);

//Create the conf struct
const EVRMRM::Config *conf = NULL;

switch(info.board) {
case MRF_VME_EVR230RF_BID: conf = &vme_evrrf_230; break;
case MRF_VME_EVR300_BID: conf = &vme_evr_300; break;
}
// Set base address

/* Use function 0 for 16-bit addressing (length 0x00800 bytes)
Expand Down
2 changes: 1 addition & 1 deletion evrMrmApp/src/evrRegMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@
#define U32_DataTx(N) (U32_DataTx_base + (N))

/* 0 <= N <= 0xfff */
#define U32_EventLog(N) (U32_EventLog_base
#define U32_EventLog(N) (U32_EventLog_base I (N))

/* 0 <= M <= 1 ram select
* 0 <= E <= 255 event code number
Expand Down

0 comments on commit 92b8848

Please sign in to comment.