| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- `ifndef PROD2U_MRDIMM_PARAMS_VH
- `define PROD2U_MRDIMM_PARAMS_VH
- // Generated mrdimm-chamber contract SHA-256: 9d7db823005669797e4ed7efd0abf66ae6ad8e40c71f5f1c2fb5690e4f05ff17
- `define MR_CLOCK_HZ 25000000
- `define MR_HOST_BAUD 921600
- `define MR_HOST_CLKS_PER_BIT 27
- `define MR_BMC_BAUD 115200
- `define MR_BMC_CLKS_PER_BIT 217
- // Unified 16-bit-length protocol
- `define MR_FRAME_LENGTH_WIDTH 16
- `define MR_CMD_SET_ALL 8'h01
- `define MR_CMD_GET_ALL 8'h02
- `define MR_CMD_MOTOR_QUEUE_WRITE 8'h03
- `define MR_CMD_MOTOR_CONTROL 8'h04
- `define MR_CMD_OUTPUT_KEEPALIVE 8'h05
- `define MR_CMD_EVENT_READ 8'h08
- `define MR_CMD_EVENT_CLEAR 8'h09
- `define MR_RSP_ACK_NACK 8'h80
- `define MR_RSP_ALL_STATUS_DATA 8'h81
- `define MR_RSP_EVENT_DATA 8'h83
- `define MR_STATUS_OK 8'd0
- `define MR_STATUS_UNSUPPORTED 8'd1
- `define MR_STATUS_BAD_LENGTH 8'd2
- `define MR_STATUS_BAD_VALUE 8'd3
- `define MR_STATUS_BUSY 8'd4
- `define MR_STATUS_QUEUE_FULL 8'd5
- `define MR_STATUS_BAD_AXIS 8'd6
- `define MR_STATUS_BAD_MODE 8'd7
- `define MR_STATUS_BAD_REGISTER 8'd8
- `define MR_STATUS_NOT_READY 8'd9
- `define MR_MAX_REQUEST_PAYLOAD 256
- `define MR_MAX_RESPONSE_PAYLOAD 1024
- `define MR_SET_ALL_PAYLOAD_LENGTH 11
- `define MR_QW_MIN_LENGTH 17
- `define MR_QW_MAX_LENGTH 129
- `define MR_CTL_LENGTH 8
- `define MR_EVENT_RECORD_BYTES 16
- `define MR_EVENT_RING_DEPTH 64
- `define MR_EVENT_MAX_READ 8
- // motors: X/Y 1000 Hz, Z 25 Hz; frequency = 500000 / half_period_us
- `define MR_AXIS_COUNT 3
- `define MR_XY_MIN_HALF_US 500
- `define MR_Z_MIN_HALF_US 20000
- `define MR_XY_DEFAULT_HALF_US 500
- `define MR_Z_DEFAULT_HALF_US 20000
- `define MR_DIR_SETUP_TICKS 1000
- `define MR_LIMIT_COUNT 6
- `define MR_LIMIT_ACTIVE_HIGH 1
- // thermal outputs and lease
- `define MR_FAN_COUNT 4
- `define MR_PTC_COUNT 4
- `define MR_PTC_PHYSICAL 8
- `define MR_PWM_HZ 500
- `define MR_PWM_PERIOD_CLKS 50000
- `define MR_PWM_CLKS_PER_PERCENT 500
- `define MR_LEASE_SECONDS 30
- `define MR_BOOT_FAN_PERCENT 20
- `define MR_BOOT_PTC_PERCENT 0
- `define MR_EXPIRE_FAN_PERCENT 20
- `define MR_EXPIRE_PTC_PERCENT 0
- `define MR_HOST_I2C_ADDRESS 7'h2A
- // ALL_STATUS_DATA layout (contract section 10 telemetry)
- // [0..7] fan0..3/ptc0..3 applied percent
- // [8..19] [20..31] [32..43] axis X/Y/Z 96-bit packed telemetry
- // [44..47] time_us low 32 [48] event record count [49] event overflow lsb
- `define MR_SNAPSHOT_LENGTH 50
- `define MR_SNAPSHOT_THERMAL_OFFSET 0
- `define MR_SNAPSHOT_AXIS_OFFSET 8
- `define MR_SNAPSHOT_AXIS_STRIDE 12
- `define MR_SNAPSHOT_TIME_OFFSET 44
- `define MR_SNAPSHOT_EVCOUNT_OFFSET 48
- `define MR_SNAPSHOT_EVOVERFLOW_OFFSET 49
- `endif
|