diff --git a/docs/04_cv32a65x/tristan/verif-spec/media/interrupt_uvm_agent.png b/docs/04_cv32a65x/tristan/verif-spec/media/interrupt_uvm_agent.png new file mode 100644 index 0000000000..03cb21e2ec Binary files /dev/null and b/docs/04_cv32a65x/tristan/verif-spec/media/interrupt_uvm_agent.png differ diff --git a/docs/04_cv32a65x/tristan/verif-spec/verification_specifications.adoc b/docs/04_cv32a65x/tristan/verif-spec/verification_specifications.adoc index 23efda5cd3..b7b59b27e1 100644 --- a/docs/04_cv32a65x/tristan/verif-spec/verification_specifications.adoc +++ b/docs/04_cv32a65x/tristan/verif-spec/verification_specifications.adoc @@ -492,6 +492,75 @@ image:./media/axiagentmerge.png[./media/axiagentmerge,width=602,height=285] At the time of writing this document, the merge of the two agents is not yet completed. It remains to publish on GitHub the agent and to integrate it with CVA6. +*_[.underline]#Interrupt Agent#_* + +This document describes the interrupt agent that plays as a interrupt controler for the CV32A65X, the agent is based on the following protocol: +https://github.com/openhwgroup/cva6/blob/master/verif/docs/Protocols/interrupt-verification.adoc + +[.underline]#Agent Architecture:# + +image:./media/interrupt_uvm_agent.png[./media/image5,width=618,height=366] + +[.underline]#Agent components:# + +The Interrupt agent provides following components: + +* uvma_interrupt_agent_c: UVM Agent. + +* uvma_interrupt_mon_c: Agent monitor, collects and broadcast transactions to the coverage model each time the interrupt interface changes. + +* uvma_interrupt_base_seq_c: Base sequence, instantiate agent configuration & context, and connect it with the sequencer configuration & context. + +* uvma_interrupt_seq_c: Generates interrupt requests & clear them based on the clear protocol decribe in link above. + +* uvma_interrupt_seq_item_c: Have main items of an interrupt transaction, `+interrupt_vector,+`interrupt_channel_mask and interrupt delays. + +* uvma_interrupt_sqr_c: Sequencer, receives requests from the sequence and send it to the driver. + +* uvma_interrupt_drv_c: drive the vif with the requests received from sequencer. + +* uvma_interrupt_cntxt_c: Agent context, instantiate VIF uma_interrupt_intf and memory uvml_mem. VIF and Memory are accessible in all components through context. + +* uvma_interrupt_cfg_c: Agent configuration, all available configuration fields are described in Configuration Fields. + +[.underline]#Supported features:# + +features are: + +* Asynchronous request: the agent support Asynchronously interrupts requests. + +* No channel Dependency: there’s no dependency between the interrupt channels, every one is managed independently. + +* Channel delay: provide delay after setting the interrupt request, also after clear it. + +* Randomize channel: full randomization of setting interrupt request. + +* Timeout: the agent is triggering a `+UVM_FATAL+` after a number of clock cycle if it failed to clear the interrupt request. + +[.underline]#Agent configuration Fields:# + +* is_active: Switch the agent mode to active. The agent support only UVM_ACTIVE mode (can’t be in passive mode). + +* trn_log_enabled: Enabling interrupt transaction logger when 1. + +* enable_interrupt: Enabling sending interrupt request when 1. + +* interrupt_plusarg_valid: Enabling interrupts from commande line request when 1. + +* num_irq_supported: Represent the number of interrupt channels supported. + +* irq_addr: Represent the memory address used by the interrupt clear mechanism. + +* enable_clear_irq: Enabling the interrupt clear mechanism when 1. + +* irq_timeout: Represent the number of clock cyle before the agent trigger a `+UVM_FATAL+` timeout. + +[.underline]#Sequences:# + +This agent provides only one sequence: + +* Set/Clear sequence: this sequence set interrupt request also clear it based on a protocol. + ==== UVCs No UVC used in this project diff --git a/verif/env/uvme/uvma_interrupt/README.md b/verif/env/uvme/uvma_interrupt/README.md index 2994761f7d..37edcd36ab 100644 --- a/verif/env/uvme/uvma_interrupt/README.md +++ b/verif/env/uvme/uvma_interrupt/README.md @@ -1,16 +1,3 @@ -Description of the interrupt agent. +*Interrupt Agent documentation:* -- The interrupt agent supports mainly 3 modes: - 1 - The agent sends one interrupt request, then we deassert it. - 2 - The agent sends several interrupt requests at the same time, with the same size, then we deassert the interrupt requests. - 3 - The agent sends randomized interrupt requests. - -- The interrupt agent has 2 type of delays in `uvma_interrupt_seq_item.sv`: - 1 - `irq_delay` is related to the delay between two interrupt request. - 2 - `irq_time` is related to the time the interrupt request could take. - -- The interrupt agent sends requests asynchronously. - -- To enable interrupt requests you should add the option `"+enable_interrupt"`. - -- There is no mechanism to clear the interrupt requests (on going). +You can see the UVM interrupt agent documentation in : https://gitlab-tss.gemalto.com/riscv/ohg-pr/cva6/-/blob/master/docs/04_cv32a65x/tristan/verif-spec/verification_specifications.adoc diff --git a/verif/env/uvme/uvma_interrupt/uvma_interrupt_pkg.sv b/verif/env/uvme/uvma_interrupt/uvma_interrupt_pkg.sv index dbe12ed238..0a08d68af4 100644 --- a/verif/env/uvme/uvma_interrupt/uvma_interrupt_pkg.sv +++ b/verif/env/uvme/uvma_interrupt/uvma_interrupt_pkg.sv @@ -29,8 +29,6 @@ package uvma_interrupt_pkg; import uvml_hrtbt_pkg::*; import uvml_trn_pkg ::*; import uvml_logs_pkg ::*; - import uvma_isacov_pkg ::*; - import uvma_rvfi_pkg ::*; parameter XLEN = 32; parameter int MAX_ADDR_WIDTH = `UVMA_AXI_ADDR_MAX_WIDTH ; // subjective maximum