Code editor is disabled. Please use desktop version of the site for a better hands on experience.
1
Events to APB
NOT SUBMITTED
Sam is a fan of the AMBA APB protocol and has taken up the challenge to design a block which converts certain input events to APB transactions. The design takes three different inputs and generates an APB transaction to a single slave. Whenever any input is asserted, Sam wants to send out an APB transaction to an address reserved for the particular event. Sam needs your help to design the events to APB converter.
All the flops (if any) should be positive edge triggered with asynchronous resets.
Interface Definition
- The block takes three single bit inputs:
event_a_i event_b_i event_c_i
- The output APB transaction uses the following signals:
The APB transaction should be generated whenever any of the input event is asserted. The generated APB transactions should always be an APB write transaction. Hence the interface doesn't contain theapb_psel_o apb_penable_o apb_paddr_o[31:0] apb_pwrite_o apb_pwdata_o[31:0] apb_pready_i
apb_prdata_i
input.
Interface Requirements
- The APB transaction must comply with the AMBA APB protocol specifications
- The three event inputs are mutually exclusive i.e. there can be atmost one event asserted on a cycle
- The APB transaction generated due to Event A should be sent to address 0xABBA0000
- The APB transaction generated due to Event B should be sent to address 0xBAFF0000
- The APB transaction generated due to Event C should be sent to address 0xCAFE0000
- The write data should give the count of the number of events seen since the last write for that particular event
- The APB interface guarantees that the
pready
signal would be asserted within 10 cycles for a particular transaction without anypslverr
. Hence the interface doesn't contain thepslverr
input - Back to back APB transactions aren't supported by interface hence there should a cycle gap before the next APB transaction is generated
- The event input interface guarantees fairness amongst the three events such that there cannot be more than 10 pending events for any input event
Note: The above fairness scheme allows you to implement the address selection logic for the APB request in any given order of priority for the inputs.
Sample Simulation
System Verilog
Verilog
VHDL
Sublime
Emacs
Sublime
Vim
initializing...
Modules1. Atomic Counters
EASY
2. Divide by 3 EASY
3. 3-bit Palindrome EASY
4. Sequence Generator EASY
5. Single Cycle Arbiters EASY
6. Events to APB MEDIUM
7. Low Power Channel HARD
8. Two Pulses MEDIUM
9. Clock Generator EASY
10. Skid Buffer HARD
11. Least Recently Used HARD
12. Edge Capture EASY
13. One Shot EASY
14. Parallel to Serial MEDIUM
15. Running Average MEDIUM
16. Big Endian Converter EASY
17. Credits & Deadlock HARD
18. Ordering HARD
19. Performance Counter EASY
20. Asynchronous Resets MEDIUM
21. Fifo Flush HARD
22. Buffering HARD
23. Compression Engine MEDIUM
24. Perfect Squares MEDIUM
25. Cross correlation EASY
26. System Verilog for Design EASY