Patdefault (#524)

* m3, ctb, moench set wait and loop addresses to 0x1fff

* update default pattern file for moench
This commit is contained in:
Dhanya Thattil 2022-08-23 07:59:39 +02:00 committed by GitHub
parent c8e31ae6d7
commit 67eea7ac36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 30 additions and 9 deletions

View File

@ -493,6 +493,8 @@ void setupDetector() {
resetPeripheral();
cleanFifos();
initializePatternAddresses();
// hv
MAX1932_SetDefines(SPI_REG, SPI_HV_SRL_CS_OTPT_MSK, SPI_HV_SRL_CLK_OTPT_MSK,
SPI_HV_SRL_DGTL_OTPT_MSK, SPI_HV_SRL_DGTL_OTPT_OFST,

View File

@ -287,15 +287,15 @@ patwaittime 1 0
patwait 2 0x0400
patwaittime 2 0
patloop 3 0x0000 0x0000
patloop 3 0x1fff 0x1fff
patnloop 3 0
patloop 4 0x0000 0x0000
patloop 4 0x1fff 0x1fff
patnloop 4 0
patloop 5 0x0000 0x0000
patloop 5 0x1fff 0x1fff
patnloop 5 0
patwait 3 0x0000
patwait 3 0x1fff
patwaittime 3 0
patwait 4 0x0000
patwait 4 0x1fff
patwaittime 4 0
patwait 5 0x0000
patwait 5 0x1fff
patwaittime 5 0

View File

@ -508,6 +508,8 @@ void setupDetector() {
resetPeripheral();
cleanFifos();
initializePatternAddresses();
// hv
MAX1932_SetDefines(SPI_REG, SPI_HV_SRL_CS_OTPT_MSK, SPI_HV_SRL_CLK_OTPT_MSK,
SPI_HV_SRL_DGTL_OTPT_MSK, SPI_HV_SRL_DGTL_OTPT_OFST,

View File

@ -474,6 +474,8 @@ void setupDetector() {
setASICDefaults();
setADIFDefaults();
initializePatternAddresses();
// enable all counters before setting dacs (vthx)
setCounterMask(MAX_COUNTER_MSK);
resetToDefaultDacs(0);

View File

@ -5,6 +5,7 @@
#include "Pattern.h"
#include "clogger.h"
void initializePatternAddresses();
#if defined(CHIPTESTBOARDD) || defined(MOENCHD)
#ifdef VIRTUAL
void initializePatternWord();

View File

@ -30,6 +30,16 @@ extern int64_t set64BitReg(int64_t value, int aLSB, int aMSB);
#define MAX_LEVELS MAX_PATTERN_LEVELS
#endif
void initializePatternAddresses() {
LOG(logINFO, ("Setting default Loop and Wait Addresses(0x%x)\n",
MAX_PATTERN_LENGTH - 1));
for (int i = 0; i != MAX_LEVELS; ++i) {
setPatternLoopAddresses(i, MAX_PATTERN_LENGTH - 1,
MAX_PATTERN_LENGTH - 1);
setPatternWaitAddress(i, MAX_PATTERN_LENGTH - 1);
}
}
#if defined(CHIPTESTBOARDD) || defined(MOENCHD)
#ifdef VIRTUAL
void initializePatternWord() {
@ -735,6 +745,8 @@ int loadPattern(char *message, enum TLogLevel printLevel,
#ifdef MYTHEN3D
trimmingPrint = printLevel;
#endif
initializePatternAddresses();
// words
for (int i = 0; i < MAX_PATTERN_LENGTH; ++i) {
if ((i % 10 == 0) && pat->word[i] != 0) {
@ -877,6 +889,8 @@ int loadPatternFile(char *patFname, char *errMessage) {
char temp[MAX_STR_LENGTH];
memset(temp, 0, MAX_STR_LENGTH);
initializePatternAddresses();
// keep reading a line
while (fgets(line, LZ, fd)) {

View File

@ -5,10 +5,10 @@
#define APILIB 0x220609
#define APIRECEIVER 0x220609
#define APIGUI 0x220609
#define APICTB 0x220816
#define APIGOTTHARD 0x220816
#define APIMYTHEN3 0x220816
#define APIMOENCH 0x220816
#define APIEIGER 0x220816
#define APIGOTTHARD2 0x220816
#define APIJUNGFRAU 0x220816
#define APIMOENCH 0x220822
#define APIMYTHEN3 0x220822
#define APICTB 0x220822