Rationalizing naming across modules - PandABlocks/PandABlocks-FPGA GitHub Wiki

Background

There are a number of inconsistencies in naming across blocks. It would be good to make breaking changes now before we do a 1-0 release.

Proposal

Make the following changes:

 *METADATA
-    MODEL           string
+    DESIGN          string
-    YAML            multiline
+    LAYOUT          multiline
+    EXPORTS         multiline

 TTLIN
     TERM            param       enum
         0   High-Z
         1   50-Ohm
     VAL             bit_out

 TTLOUT
     VAL             bit_mux

 LVDSIN
     VAL             bit_out

 LVDSOUT
     VAL             bit_mux

 INENC
     PROTOCOL        param       enum
         0   Quadrature
         1   SSI
         2   BISS
         3   enDat
-    BYPASS          param       enum
-        0   Off
-        1   On
+    CLK_SRC         param       enum
+        0   Internally generated
+        1   From CLK
     CLK_PERIOD      param       time
     FRAME_PERIOD    param       time
     BITS            param       uint 63
     LSB_DISCARD     param       uint 31
     MSB_DISCARD     param       uint 31
     SETP            write       int
     RST_ON_Z        param       bit
-    STATUS          read        enum
-        0   Link Down
-        1   Link Up
-    DCARD_ID        read        enum
+    DCARD_TYPE      read        enum
         0   DCARD id 0
         1   Encoder Monitor
         2   DCARD id 2
         3   Encoder Control
         4   DCARD id 3
         5   DCARD id 4
         6   DCARD id 5
         7   Unplugged
     A               bit_out
     B               bit_out
     Z               bit_out
     DATA            bit_out
     CLK             bit_mux
     CONN            bit_out
     VAL             pos_out

 OUTENC
     PROTOCOL        param       enum
         0   Quadrature
         1   SSI
         2   BISS
         3   enDat
+        4   ABZ Passthrough
+        5   DATA Passthrough
-    BYPASS          param       enum
-        0   Off
-        1   On
     BITS            param       uint 32
     QPERIOD         param       time
     ENABLE          bit_mux
     A               bit_mux
     B               bit_mux
     Z               bit_mux
     DATA            bit_mux
     CLK             bit_out
     VAL             pos_mux
     CONN            bit_mux
-    DCARD_ID        read        enum
+    DCARD_TYPE      read        enum
         0   DCARD id 0
         1   Encoder Monitor
         2   DCARD id 2
         3   Encoder Control
         4   DCARD id 3
         5   DCARD id 4
         6   DCARD id 5
         7   Unplugged
     QSTATE          read        enum
         0   Disabled
         1   At position
         2   Slewing

 LUT
     FUNC            param       lut
     A               param   enum
         0   Input Value
         1   Rising Edge
         2   Falling Edge
         3   Either Edge
     B               param   enum
         0   Input Value
         1   Rising Edge
         2   Falling Edge
         3   Either Edge
     C               param   enum
         0   Input Value
         1   Rising Edge
         2   Falling Edge
         3   Either Edge
     D               param   enum
         0   Input Value
         1   Rising Edge
         2   Falling Edge
         3   Either Edge
     E               param   enum
         0   Input Value
         1   Rising Edge
         2   Falling Edge
         3   Either Edge
     INPA            bit_mux
     INPB            bit_mux
     INPC            bit_mux
     INPD            bit_mux
     INPE            bit_mux
     OUT             bit_out

 SRGATE
     WHEN_DISABLED   param       enum
         0   Set output low
         1   Set output high
         2   Keep current output
     SET_EDGE        param       enum
         0   Rising
         1   Falling
-        2   Rising or Falling
+        2   Either
     RST_EDGE        param       enum
         0   Rising
         1   Falling
-        2   Rising or Falling
+        2   Either
     FORCE_SET       write       action
     FORCE_RST       write       action
     ENABLE          bit_mux
     SET             bit_mux
     RST             bit_mux
     OUT             bit_out

 DIV
     DIVISOR         param
     FIRST_PULSE     param       enum
         0   OutN
         1   OutD
     INP             bit_mux
     ENABLE          bit_mux
     OUTD            bit_out
     OUTN            bit_out
     COUNT           read

 PULSE
     DELAY           time
     WIDTH           time
-    INP             bit_mux
+    TRIG            bit_mux
     ENABLE          bit_mux
     OUT             bit_out
-    ERR_OVERFLOW    read        bit
-    ERR_PERIOD      read        bit
-    QUEUE           read        uint 1023
+    QUEUED          read        uint 1023
-    MISSED_CNT      read
+    DROPPED         read
     TRIG_EDGE        param       enum
         0   Rising
         1   Falling
-        2   Rising or Falling
+        2   Either

 SEQ
     TABLE           table   4
         15:0    REPEATS
         19:16   TRIGGER     enum
             0   Immediate
             1   BITA=0
             2   BITA=1
             3   BITB=0
             4   BITB=1
             5   BITC=0
             6   BITC=1
             7   POSA>=POSITION
             8   POSA<=POSITION
             9   POSB>=POSITION
             10  POSB<=POSITION
             11  POSC>=POSITION
             12  POSC<=POSITION
         63:32   POSITION
         95:64   TIME1
         20:20   OUTA1
         21:21   OUTB1
         22:22   OUTC1
         23:23   OUTD1
         24:24   OUTE1
         25:25   OUTF1
         127:96  TIME2
         26:26   OUTA2
         27:27   OUTB2
         28:28   OUTC2
         29:29   OUTD2
         30:30   OUTE2
         31:31   OUTF2
     PRESCALE        param       time
     REPEATS         param
     ENABLE          bit_mux
     BITA            bit_mux
     BITB            bit_mux
     BITC            bit_mux
     POSA            pos_mux
     POSB            pos_mux
     POSC            pos_mux
     ACTIVE          bit_out
     OUTA            bit_out
     OUTB            bit_out
     OUTC            bit_out
     OUTD            bit_out
     OUTE            bit_out
     OUTF            bit_out
     TABLE_REPEAT    read
     TABLE_LINE      read
     LINE_REPEAT     read
     STATE           read    enum
         0   WAIT_ENABLE
         1   LOAD_TABLE
         2   WAIT_TRIGGER
         3   PHASE1
         4   PHASE2

 QDEC
     RST_ON_Z        param       bit
     SETP            write       int
     A               bit_mux
     B               bit_mux
     Z               bit_mux
     OUT             pos_out

 POSENC
     INP             pos_mux
     QPERIOD         param       time
     ENABLE          bit_mux
     PROTOCOL        param       enum
         0   Quadrature
         1   Step/Direction
     A               bit_out
     B               bit_out
     QSTATE          read        enum
         0   Disabled
         1   At position
         2   Slewing

-ADDER
+CALC
     INPA            pos_mux
     INPB            pos_mux
     INPC            pos_mux
     INPD            pos_mux
-    INPA_INVERT     param       enum
-        0   No
-        1   Yes
+    A               param       enum
+        0   Value
+        1   -Value
-    INPB_INVERT     param       enum
-        0   No
-        1   Yes
+    B               param       enum
+        0   Value
+        1   -Value
-    INPC_INVERT     param       enum
-        0   No
-        1   Yes
+    C               param       enum
+        0   Value
+        1   -Value
-    INPD_INVERT     param       enum
-        0   No
-        1   Yes
+    D               param       enum
+        0   Value
+        1   -Value
-    SCALE           param       enum
-        0   /1
-        1   /2
-        2   /4
-        3   /8
+    FUNC            param       enum
+        0   A+B+C+D
+        1   (A+B+C+D)/2
+        2   (A+B+C+D)/4
     OUT             pos_out

 COUNTER
     START           param    int
     STEP            param
     ENABLE          bit_mux
     TRIG            bit_mux
     DIR             bit_mux
     CARRY           bit_out
     OUT             pos_out

 PGEN
     CYCLES          param
     ENABLE          bit_mux
     TRIG            bit_mux
     OUT             pos_out
     TABLE           table
-    TABLE_STATUS    read        enum
+    HEALTH          read        enum
-        0   Ok
+        0   OK
         1   Table not ready
         2   Table end reached
         3   DMA overrun

 PCOMP
     PRE_START       param       int
     START           param       int
     WIDTH           param       int
     STEP            param       int
     PULSES          param
     RELATIVE        param       enum
         0   Absolute
         1   Relative
     DIR             param       enum
         0   Positive
         1   Negative
         2   Either
     ENABLE          bit_mux
     INP             pos_mux
     ACTIVE          bit_out
     OUT             bit_out
     HEALTH          read        enum
         0   OK
-        1   Error: Position jumped by more than STEP
+        1   Position jumped by more than STEP
-        2   Error: Can't guess DIR when RELATIVE and PRE_START=0 and START=0
+        2   Can't guess DIR when RELATIVE and PRE_START=0 and START=0
     PRODUCED        read
     STATE           read        enum
         0   WAIT_ENABLE
         1   WAIT_DIR
         2   WAIT_PRE_START
         3   WAIT_RISING
         4   WAIT_FALLING

 PCAP
     ENABLE          bit_mux
     GATE            bit_mux
-    CAPTURE         bit_mux
+    TRIG            bit_mux
-    CAPTURE_EDGE    param       enum
+    TRIG_EDGE       param       enum
         0   Rising
         1   Falling
-        2   Rising or Falling
+        2   Either
     SHIFT_SUM       param       uint 8
     HEALTH          read        enum
-        0   Ok
+        0   OK
         1   Capture events too close together
         2   Samples overflow
     ACTIVE          bit_out
     TS_START        ext_out     timestamp
     TS_END          ext_out     timestamp
     TS_CAPTURE      ext_out     timestamp
     SAMPLES         ext_out     samples
     BITS0           ext_out     bits 0
     BITS1           ext_out     bits 1
     BITS2           ext_out     bits 2
     BITS3           ext_out     bits 3

 BITS
     A               param       bit
     B               param       bit
     C               param       bit
     D               param       bit
     OUTA            bit_out
     OUTB            bit_out
     OUTC            bit_out
     OUTD            bit_out

 CLOCKS
     A_PERIOD        param       time
     B_PERIOD        param       time
     C_PERIOD        param       time
     D_PERIOD        param       time
     OUTA            bit_out
     OUTB            bit_out
     OUTC            bit_out
     OUTD            bit_out

-SLOW
+SYSTEM
     TEMP_PSU        read        int
     TEMP_SFP        read        int
     TEMP_ENC_L      read        int
     TEMP_PICO       read        int
     TEMP_ENC_R      read        int
+    TEMP_ZYNQ       xadc
     ALIM_12V0       read
     PICO_5V0        read
     IO_5V0          read
     SFP_3V3         read
     FMC_15VN        read
     FMC_15VP        read
     ENC_24V         read
     FMC_12V         read
+    VCCINT          xadc

-SFP
+SFP1_EVR
+SFP2_UDPTRIG
+SFP3_UDPTRIG
 ...

-FMC
+FMC_24VIN
+FMC_24VOUT
+FMC_AIN
+FMC_AOUT
+FMC_LBACK
 ...

 FILTER
     MODE            param       enum
         0   difference
         1   average
     TRIG            bit_mux
     INP             pos_mux
     ENABLE          bit_mux
     OUT             pos_out
     READY           bit_out
-    ERR             read        enum
+    HEALTH          read        enum
         0   OK
         1   Accumulator overflow
         2   Divider retrigger

Progress

  • For discussion on 01/06/2018
  • Change every param enum to have no spaces in it, lowercase_with_spaces
  • Divide by 3 in CALC block
  • Call them SFP1..SFP3