addrmap OpenTitan_SpiDevice {

addrmap {
    desc = "Generated by RenodeModelsAnalyzer";
    reg {
        name="InterruptState";
        desc = "This register has the following custom Renode callbacks: Write";
        regwidth=0x20;
            field {
                sw = rw;
                onwrite = woclr;
            } generic_rx_full[0:0];
            field {
                sw = rw;
                onwrite = woclr;
            } generic_rx_watermark[1:1];
            field {
                sw = rw;
                onwrite = woclr;
            } generic_tx_watermark[2:2];
            field {
                sw = rw;
                onwrite = woclr;
            } generic_rx_error[3:3];
            field {
                sw = rw;
                onwrite = woclr;
            } generic_rx_overflow[4:4];
            field {
                sw = rw;
                onwrite = woclr;
            } generic_tx_underflow[5:5];
            field {
                sw = rw;
                onwrite = woclr;
            } upload_cmdfifo_not_empty[6:6];
            field {
                sw = rw;
                onwrite = woclr;
            } upload_payload_not_empty[7:7];
            field {
                sw = rw;
                onwrite = woclr;
            } upload_payload_overflow[8:8];
            field {
                sw = rw;
                onwrite = woclr;
            } readbuf_watermark[9:9];
            field {
                sw = rw;
                onwrite = woclr;
            } readbuf_flip[10:10];
            field {
                sw = rw;
                onwrite = woclr;
            } tpm_header_not_empty[11:11];
    } InterruptState @ 0x0;
    reg {
        name="InterruptEnable";
        desc = "This register has the following custom Renode callbacks: Write";
        regwidth=0x20;
            field {
                sw = rw;
            } generic_rx_full[0:0];
            field {
                sw = rw;
            } generic_rx_watermark[1:1];
            field {
                sw = rw;
            } generic_tx_watermark[2:2];
            field {
                sw = rw;
            } generic_rx_error[3:3];
            field {
                sw = rw;
            } generic_rx_overflow[4:4];
            field {
                sw = rw;
            } generic_tx_underflow[5:5];
            field {
                sw = rw;
            } upload_cmdfifo_not_empty[6:6];
            field {
                sw = rw;
            } upload_payload_not_empty[7:7];
            field {
                sw = rw;
            } upload_payload_overflow[8:8];
            field {
                sw = rw;
            } readbuf_watermark[9:9];
            field {
                sw = rw;
            } readbuf_flip[10:10];
            field {
                sw = rw;
            } tpm_header_not_empty[11:11];
    } InterruptEnable @ 0x4;
    reg {
        name="InterruptTest";
        desc = "This register has the following custom Renode callbacks: Write";
        regwidth=0x20;
            field {
                desc = "This field has the following custom Renode callbacks: Write.";
                sw = w;
            } generic_rx_full[0:0];
            field {
                desc = "This field has the following custom Renode callbacks: Write.";
                sw = w;
            } generic_rx_watermark[1:1];
            field {
                desc = "This field has the following custom Renode callbacks: Write.";
                sw = w;
            } generic_tx_watermark[2:2];
            field {
                desc = "This field has the following custom Renode callbacks: Write.";
                sw = w;
            } generic_rx_error[3:3];
            field {
                desc = "This field has the following custom Renode callbacks: Write.";
                sw = w;
            } generic_rx_overflow[4:4];
            field {
                desc = "This field has the following custom Renode callbacks: Write.";
                sw = w;
            } generic_tx_underflow[5:5];
            field {
                desc = "This field has the following custom Renode callbacks: Write.";
                sw = w;
            } upload_cmdfifo_not_empty[6:6];
            field {
                desc = "This field has the following custom Renode callbacks: Write.";
                sw = w;
            } upload_payload_not_empty[7:7];
            field {
                desc = "This field has the following custom Renode callbacks: Write.";
                sw = w;
            } upload_payload_overflow[8:8];
            field {
                desc = "This field has the following custom Renode callbacks: Write.";
                sw = w;
            } readbuf_watermark[9:9];
            field {
                desc = "This field has the following custom Renode callbacks: Write.";
                sw = w;
            } readbuf_flip[10:10];
            field {
                desc = "This field has the following custom Renode callbacks: Write.";
                sw = w;
            } tpm_header_not_empty[11:11];
    } InterruptTest @ 0x8;
    reg {
        name="AlertTest";
        regwidth=0x20;
            field {
                desc = "This field has the following custom Renode callbacks: Write.";
                sw = w;
            } fatal_fault[0:0];
    } AlertTest @ 0xc;
    reg {
        name="Control";
        regwidth=0x20;
            field {
                sw = rw;
            } ABORT[0:0];
            field {
                desc = "This field has the following custom Renode callbacks: Write.";
                sw = rw;
                reset=2'b1;
            } MODE[5:4];
            field {
                desc = "This field has the following custom Renode callbacks: Write.";
                sw = rw;
            } rst_txfifo[16:16];
            field {
                desc = "This field has the following custom Renode callbacks: Write.";
                sw = rw;
            } rst_rxfifo[17:17];
            field {
                desc = "The field is a Tag.";
                sw = rw;
                reset=1'b1;
            } sram_clk_en[31:31];
    } Control @ 0x10;
    reg {
        name="Configuration";
        regwidth=0x20;
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } CPOL[0:0];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } CPHA[1:1];
            field {
                sw = rw;
            } tx_order[2:2];
            field {
                sw = rw;
            } rx_order[3:3];
            field {
                desc = "The field is a Tag.";
                sw = rw;
                reset=8'b1111111;
            } timer_v[15:8];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } addr_4b_en[16:16];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } mailbox_en[24:24];
    } Configuration @ 0x14;
    reg {
        name="FifoLevel";
        regwidth=0x20;
            field {
                sw = rw;
                reset=16'b10000000;
            } rxlvl[15:0];
            field {
                sw = rw;
            } txlvl[31:16];
    } FifoLevel @ 0x18;
    reg {
        name="AsyncFifoLevel";
        regwidth=0x20;
            field {
                desc = "This field has the following custom Renode callbacks: Provider.";
                sw = r;
            } rxlvl[7:0];
            field {
                desc = "This field has the following custom Renode callbacks: Provider.";
                sw = r;
            } txlvl[23:16];
    } AsyncFifoLevel @ 0x1c;
    reg {
        name="SPIDevicestatus";
        regwidth=0x20;
            field {
                desc = "This field has the following custom Renode callbacks: Provider.";
                sw = r;
            } rxf_full[0:0];
            field {
                desc = "This field has the following custom Renode callbacks: Provider.";
                sw = r;
                reset=1'b1;
            } rxf_empty[1:1];
            field {
                desc = "This field has the following custom Renode callbacks: Provider.";
                sw = r;
            } txf_full[2:2];
            field {
                desc = "This field has the following custom Renode callbacks: Provider.";
                sw = r;
                reset=1'b1;
            } txf_empty[3:3];
            field {
                sw = r;
                reset=1'b1;
            } abort_done[4:4];
            field {
                sw = r;
                reset=1'b1;
            } csb[5:5];
    } SPIDevicestatus @ 0x20;
    reg {
        name="ReceiverFifoSramPointers";
        regwidth=0x20;
            field {
                desc = "This field has the following custom Renode callbacks: Change, Provider.";
                sw = rw;
            } RPTR[15:0];
            field {
                desc = "This field has the following custom Renode callbacks: Provider.";
                sw = r;
            } WPTR[31:16];
    } ReceiverFifoSramPointers @ 0x24;
    reg {
        name="TransmitterFifoSramPointers";
        regwidth=0x20;
            field {
                desc = "This field has the following custom Renode callbacks: Provider.";
                sw = r;
            } RPTR[15:0];
            field {
                desc = "This field has the following custom Renode callbacks: Change, Provider.";
                sw = rw;
            } WPTR[31:16];
    } TransmitterFifoSramPointers @ 0x28;
    reg {
        name="ReceiverFifoSramAddresses";
        desc = "This register has the following custom Renode callbacks: Write";
        regwidth=0x20;
            field {
                sw = rw;
            } base[15:0];
            field {
                sw = rw;
                reset=16'b111111100;
            } limit[31:16];
    } ReceiverFifoSramAddresses @ 0x2c;
    reg {
        name="TransmitterFifoSramAddresses";
        desc = "This register has the following custom Renode callbacks: Write";
        regwidth=0x20;
            field {
                sw = rw;
                reset=16'b1000000000;
            } base[15:0];
            field {
                sw = rw;
                reset=16'b1111111100;
            } limit[31:16];
    } TransmitterFifoSramAddresses @ 0x30;
    reg {
        name="InterceptEnable";
        regwidth=0x20;
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } status[0:0];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } jedec[1:1];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } sfdp[2:2];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } mbx[3:3];
    } InterceptEnable @ 0x34;
    reg {
        name="LastReadAddress";
        regwidth=0x20;
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } addr[31:0];
    } LastReadAddress @ 0x38;
    reg {
        name="FlashStatus";
        regwidth=0x20;
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } busy[0:0];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } status[23:1];
    } FlashStatus @ 0x3c;
    reg {
        name="JedecCc";
        regwidth=0x20;
            field {
                desc = "The field is a Tag.";
                sw = rw;
                reset=8'b1111111;
            } cc[7:0];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } num_cc[15:8];
    } JedecCc @ 0x40;
    reg {
        name="JedecId";
        regwidth=0x20;
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } id[15:0];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } mf[23:16];
    } JedecId @ 0x44;
    reg {
        name="ReadThreshold";
        regwidth=0x20;
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } threshold[9:0];
    } ReadThreshold @ 0x48;
    reg {
        name="MailboxAddress";
        regwidth=0x20;
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } addr[31:0];
    } MailboxAddress @ 0x4c;
    reg {
        name="UploadStatus";
        regwidth=0x20;
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } cmdfifo_depth[4:0];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } cmdfifo_notempty[7:7];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } addrfifo_depth[12:8];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } addrfifo_notempty[5:5];
    } UploadStatus @ 0x50;
    reg {
        name="UploadStatus2";
        regwidth=0x20;
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } payload_depth[8:0];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } payload_start_idx[23:16];
    } UploadStatus2 @ 0x54;
    reg {
        name="UploadCmdFifo";
        regwidth=0x20;
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } data[7:0];
    } UploadCmdFifo @ 0x58;
    reg {
        name="UploadAddrFifo";
        regwidth=0x20;
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } data[31:0];
    } UploadAddrFifo @ 0x5c;
    reg {
        name="CommandFilter";
        regwidth=0x20;
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } filter_0__32__idx[0:0];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } filter_1__32__idx[1:1];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } filter_2__32__idx[2:2];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } filter_3__32__idx[3:3];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } filter_4__32__idx[4:4];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } filter_5__32__idx[5:5];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } filter_6__32__idx[6:6];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } filter_7__32__idx[7:7];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } filter_8__32__idx[8:8];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } filter_9__32__idx[9:9];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } filter_10__32__idx[10:10];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } filter_11__32__idx[11:11];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } filter_12__32__idx[12:12];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } filter_13__32__idx[13:13];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } filter_14__32__idx[14:14];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } filter_15__32__idx[15:15];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } filter_16__32__idx[16:16];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } filter_17__32__idx[17:17];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } filter_18__32__idx[18:18];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } filter_19__32__idx[19:19];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } filter_20__32__idx[20:20];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } filter_21__32__idx[21:21];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } filter_22__32__idx[22:22];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } filter_23__32__idx[23:23];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } filter_24__32__idx[24:24];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } filter_25__32__idx[25:25];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } filter_26__32__idx[26:26];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } filter_27__32__idx[27:27];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } filter_28__32__idx[28:28];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } filter_29__32__idx[29:29];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } filter_30__32__idx[30:30];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } filter_31__32__idx[31:31];
    } CommandFilter [8]@ 0x60 += 4;
    reg {
        name="AddressSwapMask";
        regwidth=0x20;
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } mask[31:0];
    } AddressSwapMask @ 0x80;
    reg {
        name="AddressSwapData";
        regwidth=0x20;
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } data[31:0];
    } AddressSwapData @ 0x84;
    reg {
        name="PayloadSwapMask";
        regwidth=0x20;
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } mask[31:0];
    } PayloadSwapMask @ 0x88;
    reg {
        name="PayloadSwapData";
        regwidth=0x20;
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } data[31:0];
    } PayloadSwapData @ 0x8c;
    reg {
        name="CommandInfo";
        regwidth=0x20;
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } opcode_idx[7:0];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } addr_mode_idx[9:8];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } addr_swap_en_idx[10:10];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } mbyte_en_idx[11:11];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } dummy_size_idx[14:12];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } dummy_en_idx[15:15];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } payload_en_idx[19:16];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } payload_dir_idx[20:20];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } payload_swap_en_idx[21:21];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } upload_idx[24:24];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } busy_idx[25:25];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } valid_idx[31:31];
    } CommandInfo [24]@ 0x90 += 4;
    reg {
        name="CommandInfoEn4b";
        regwidth=0x20;
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } opcode[7:0];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } valid[31:31];
    } CommandInfoEn4b @ 0xf0;
    reg {
        name="OpcodeForEX4B";
        regwidth=0x20;
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } opcode[7:0];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } valid[31:31];
    } OpcodeForEX4B @ 0xf4;
    reg {
        name="OpcodeforWriteEnable";
        regwidth=0x20;
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } opcode[7:0];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } valid[31:31];
    } OpcodeforWriteEnable @ 0xf8;
    reg {
        name="OpcodeForWriteDisable";
        regwidth=0x20;
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } opcode[7:0];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } valid[31:31];
    } OpcodeForWriteDisable @ 0xfc;
    reg {
        name="TPMCapability";
        regwidth=0x20;
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } rev[7:0];
            field {
                desc = "The field is a Tag.";
                sw = rw;
                reset=1'b1;
            } locality[8:8];
            field {
                desc = "The field is a Tag.";
                sw = rw;
                reset=3'b10;
            } max_xfer_size[18:16];
    } TPMCapability @ 0x800;
    reg {
        name="TPMConfig";
        regwidth=0x20;
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } en[0:0];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } tpm_mode[1:1];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } hw_reg_dis[2:2];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } tpm_reg_chk_dis[3:3];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } invalid_locality[4:4];
    } TPMConfig @ 0x804;
    reg {
        name="TPMStatus";
        regwidth=0x20;
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } cmdaddr_notempty[0:0];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } rdfifo_notempty[1:1];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } rdfifo_depth[6:4];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } wrfifo_depth[10:8];
    } TPMStatus @ 0x808;
    reg {
        name="TPMAccess0";
        regwidth=0x20;
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } access_0[7:0];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } access_1[15:8];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } access_2[23:16];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } access_3[31:24];
    } TPMAccess0 @ 0x80c;
    reg {
        name="TPMAccess1";
        regwidth=0x20;
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } access_4[7:0];
    } TPMAccess1 @ 0x810;
    reg {
        name="TPMSts";
        regwidth=0x20;
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } sts[31:0];
    } TPMSts @ 0x814;
    reg {
        name="TPMIntfCapability";
        regwidth=0x20;
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } intf_capability[31:0];
    } TPMIntfCapability @ 0x818;
    reg {
        name="TPMIntCapability";
        regwidth=0x20;
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } int_enable[31:0];
    } TPMIntCapability @ 0x81c;
    reg {
        name="TPMIntVector";
        regwidth=0x20;
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } int_vector[7:0];
    } TPMIntVector @ 0x820;
    reg {
        name="TPMIntStatus";
        regwidth=0x20;
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } int_status[31:0];
    } TPMIntStatus @ 0x824;
    reg {
        name="TPMDidVid";
        regwidth=0x20;
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } vid[15:0];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } did[31:16];
    } TPMDidVid @ 0x828;
    reg {
        name="TPMRid";
        regwidth=0x20;
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } rid[7:0];
    } TPMRid @ 0x82c;
    reg {
        name="TPMCommandAndAddressBuffer";
        regwidth=0x20;
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } addr[23:0];
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } cmd[31:24];
    } TPMCommandAndAddressBuffer @ 0x830;
    reg {
        name="TPMReadFifo";
        regwidth=0x20;
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } value[7:0];
    } TPMReadFifo @ 0x834;
    reg {
        name="TPMWriteFifo";
        regwidth=0x20;
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } value[7:0];
    } TPMWriteFifo @ 0x838;
    reg {
        name="Buffer";
        regwidth=0x20;
            field {
                desc = "The field is a Tag.";
                sw = rw;
            } SPIinternalbufferidx[2:0];
    } Buffer [1024]@ 0x1000 += 4;
} Registers_addrmap;


};