@@ -18,31 +18,36 @@ local out = io.stdout
1818
1919
2020out :write (' uint64 constant UARCH_CYCLE_ADDRESS = 0x' .. hex (cartesi .machine :get_reg_address (" uarch_cycle" )) .. ' ;\n ' )
21+ out :write (' uint64 constant UARCH_CYCLE_MAX = 0x' .. hex (cartesi .UARCH_CYCLE_MAX ) .. ' ;\n ' )
2122out :write (' uint64 constant UARCH_HALT_FLAG_ADDRESS = 0x' ..
2223 hex (cartesi .machine :get_reg_address (" uarch_halt_flag" )) .. ' ;\n ' )
2324out :write (' uint64 constant UARCH_PC_ADDRESS = 0x' .. hex (cartesi .machine :get_reg_address (" uarch_pc" )) .. ' ;\n ' )
2425out :write (' uint64 constant UARCH_X0_ADDRESS = 0x' .. hex (cartesi .machine :get_reg_address (" uarch_x0" )) .. ' ;\n ' )
2526out :write (' uint64 constant UARCH_SHADOW_START_ADDRESS = 0x' .. hex (cartesi .UARCH_SHADOW_START_ADDRESS ) .. ' ;\n ' )
2627out :write (' uint64 constant UARCH_SHADOW_LENGTH = 0x' .. hex (cartesi .UARCH_SHADOW_LENGTH ) .. ' ;\n ' )
28+ out :write (' uint64 constant AR_SHADOW_TLB_START = 0x' .. hex (cartesi .AR_SHADOW_TLB_START ) .. ' ;\n ' )
29+ out :write (' uint64 constant AR_SHADOW_TLB_LENGTH = 0x' .. hex (cartesi .AR_SHADOW_TLB_LENGTH ) .. ' ;\n ' )
2730out :write (' uint64 constant UARCH_RAM_START_ADDRESS = 0x' .. hex (cartesi .UARCH_RAM_START_ADDRESS ) .. ' ;\n ' )
2831out :write (' uint64 constant UARCH_RAM_LENGTH = 0x' .. hex (cartesi .UARCH_RAM_LENGTH ) .. ' ;\n ' )
2932out :write (' uint64 constant UARCH_STATE_START_ADDRESS = 0x' .. hex (cartesi .UARCH_STATE_START_ADDRESS ) .. ' ;\n ' )
3033out :write (' uint8 constant UARCH_STATE_LOG2_SIZE = ' .. cartesi .UARCH_STATE_LOG2_SIZE .. ' ;\n ' )
3134out :write (' bytes32 constant UARCH_PRISTINE_STATE_HASH = 0x' .. hexstring (cartesi .UARCH_PRISTINE_STATE_HASH ) .. ' ;\n ' )
3235out :write (' uint64 constant UARCH_ECALL_FN_HALT = ' .. cartesi .UARCH_ECALL_FN_HALT .. ' ;\n ' )
3336out :write (' uint64 constant UARCH_ECALL_FN_PUTCHAR = ' .. cartesi .UARCH_ECALL_FN_PUTCHAR .. ' ;\n ' )
37+ out :write (' uint64 constant UARCH_ECALL_FN_MARK_DIRTY_PAGE = ' .. cartesi .UARCH_ECALL_FN_MARK_DIRTY_PAGE .. ' ;\n ' )
38+ out :write (' uint64 constant UARCH_ECALL_FN_WRITE_TLB = ' .. cartesi .UARCH_ECALL_FN_WRITE_TLB .. ' ;\n ' )
3439out :write (' uint64 constant HTIF_YIELD = 0x' .. hex (cartesi .machine :get_reg_address (" htif_iyield" )) .. ' ;\n ' )
3540out :write (' uint64 constant IFLAGS_Y_ADDRESS = 0x' .. hex (cartesi .machine :get_reg_address (" iflags_Y" )) .. ' ;\n ' )
3641out :write (' uint64 constant HTIF_FROMHOST_ADDRESS = 0x' ..
3742 hex (cartesi .machine :get_reg_address (" htif_fromhost" )) .. ' ;\n ' )
3843out :write (' uint8 constant CMIO_YIELD_REASON_ADVANCE_STATE = 0x' ..
3944 hex (cartesi .CMIO_YIELD_REASON_ADVANCE_STATE ) .. ' ;\n ' )
40- out :write (' uint32 constant TREE_LOG2_WORD_SIZE = 0x' .. hex (cartesi .TREE_LOG2_WORD_SIZE ) .. ' ;\n ' )
41- out :write (' uint32 constant TREE_WORD_SIZE = uint32(1) << TREE_LOG2_WORD_SIZE ;\n ' )
42- out :write (' uint64 constant PMA_CMIO_RX_BUFFER_START = 0x' .. hex (cartesi .PMA_CMIO_RX_BUFFER_START ) .. ' ;\n ' )
43- out :write (' uint8 constant PMA_CMIO_RX_BUFFER_LOG2_SIZE = 0x' .. hex (cartesi .PMA_CMIO_RX_BUFFER_LOG2_SIZE ) .. ' ;\n ' )
44- out :write (' uint64 constant PMA_CMIO_TX_BUFFER_START = 0x' .. hex (cartesi .PMA_CMIO_TX_BUFFER_START ) .. ' ;\n ' )
45- out :write (' uint8 constant PMA_CMIO_TX_BUFFER_LOG2_SIZE = 0x' .. hex (cartesi .PMA_CMIO_TX_BUFFER_LOG2_SIZE ) .. ' ;\n ' )
45+ out :write (' uint32 constant HASH_TREE_LOG2_WORD_SIZE = 0x' .. hex (cartesi .HASH_TREE_LOG2_WORD_SIZE ) .. ' ;\n ' )
46+ out :write (' uint32 constant HASH_TREE_WORD_SIZE = uint32(1) << HASH_TREE_LOG2_WORD_SIZE ;\n ' )
47+ out :write (' uint64 constant AR_CMIO_RX_BUFFER_START = 0x' .. hex (cartesi .AR_CMIO_RX_BUFFER_START ) .. ' ;\n ' )
48+ out :write (' uint8 constant AR_CMIO_RX_BUFFER_LOG2_SIZE = 0x' .. hex (cartesi .AR_CMIO_RX_BUFFER_LOG2_SIZE ) .. ' ;\n ' )
49+ out :write (' uint64 constant AR_CMIO_TX_BUFFER_START = 0x' .. hex (cartesi .AR_CMIO_TX_BUFFER_START ) .. ' ;\n ' )
50+ out :write (' uint8 constant AR_CMIO_TX_BUFFER_LOG2_SIZE = 0x' .. hex (cartesi .AR_CMIO_TX_BUFFER_LOG2_SIZE ) .. ' ;\n ' )
4651out :close ()
4752
4853out :close ()
0 commit comments