Replies: 2 comments
-
|
The proposal looks great. I do not understand What is the cost of such a memory mapped IO address? Would it be cheaper to execute an ECALL instruction which exits QEMU? I believe we should replace |
Beta Was this translation helpful? Give feedback.
-
|
I propose with the same syntax as Microprocessor Initialization and Configuration Another possibility would be to just define a process which can be connected to a changing edge on a pin. I have no idea how a signal can be emulated by QEMU. In old VADL we had a @linushdot, do you have some ideas and comments on these things? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The processor definition is being completely revised.
As defined in #81, the processor has the following syntax:
However, all definitions within the
processorwill be replaced with new ones.Reset Definition
The
startupdefinition is replaced byreset, a procedure that can read and write resources. It runs when the simulator starts and on every CPU reset. Its main job is to initialize the CPU state.At minimum, it should set the program counter. For example, on RV64IM:
Since
resetinitializes the PC, the oldstartdefinition is removed.Memory Region Definitions
This replaces the existing
firmwaredefinition.In VADL, a
memorydefinition defines an address space, in the processor this must be divided into memory regions serving different purposes.Each region has a type defining its usage and accessibility. For now, we support:
The
memory regiondefinitions follow the same type specification format as thelogicdefinition in the MIA.Explanation
DRAM: A RAM region in
MEMstarting at0x8000000.[firmware]tag means firmware passed with-biosis loaded here.[ size: ... ].MROM: A ROM region in
MEMinitialized with startup machine code.[ base: ... ]and[ size: ... ]are optional if they can be inferred.The
[firmware]annotation can also be placed on a ROM region. In that case, both size and base must be specified. It’s the user’s responsibility to ensure the loaded firmware doesn’t overlap initialized content. If the firmware exceeds the region size, initialization will fail.StopExit AddressWhile the
[ htif ]annotation already enables simulation termination, thestopexit addressdefinition introduces a simpler mechanism: writing to a specific address causes QEMU to shut down. The written value is recorded as the exit code.This is useful for stopping execution without needing ELF firmware (which is required for our HTIF implementation).
In the future, users will be able to define custom memory regions like
, possibly backed by C modules, to implement custom read/write behavior. This would allow full control over device-level communication and simulation behavior.
Syntax
Reset
Reset is part of the
cpuProcessDefinition, but right now it will be the only one.Memory Region
Available annotations:
The firmware has an optional expression that represents the load address.
Stop
Beta Was this translation helpful? Give feedback.
All reactions