On 25 September 2018 at 12:47, Damien Hedde <damien.he...@greensocs.com> wrote:
>
>
> On 9/25/18 11:36 AM, Peter Maydell wrote:
>> On 17 September 2018 at 09:40,  <damien.he...@greensocs.com> wrote:
>>> +Outputs must be initialized in the device_reset method to ensure every 
>>> connected
>>> +inputs is updated at machine startup.
>>
>> device_reset should not set outputs.
>
> How do the initialization then ?
> Only alternative I see is to initialize a clock input when it is
> connected to an output.
>
> If device_reset does not set outputs (which are a direct consequence of
> a internal device state being reset). It means calling device_reset at
> any other point than simulation startup will break things. Is that the
> semantic behind device_reset ?

device_reset's semantics are not great, but basically they are
"power on reset", equivalent to a complete simulation restart.
If a device has some other kind of warm reset triggered by
eg a register write it needs to implement that itself, perhaps
sharing code with the device reset method. A warm reset triggered
by a register write can obviously assert output signals.

I have some thoughts about trying to clean up our reset
semantics which I need to write up later this week.

thanks
-- PMM

Reply via email to