Simple arbiter not triggering a mockup coprocessor (PWM timer)

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
ChRe_4711096
Level 4
Level 4
50 replies posted 25 replies posted 25 sign-ins

I'm trying to design a simple arbiter that cycles through 4 enable signals that come from 4 different internal sources:

  • the enable signals are multiplexed with a selection index (sel_out[1:0])
  • if the selected enable signal is high, the selection index is kept stable and a coprocessor is triggered (cp_start) to start working for the selected enable source
  • the arbiter then waits for a pulse on cp_done before counting is resumed on sel_out

Anmerkung 2020-08-12 134256.png

  • State_0 was inserted to avoid an off-by-one error on sel_out
  • sel_int is used to output sel_out
  • cp_done is generated by checking if the state machine is in that state:

Anmerkung 2020-08-12 134522.png

For now I'm using a one-shot timer to roughly mimic the coprocessor's behavior. cp_start starts the timer, and the timer's overflow output signals cp_done:

Anmerkung 2020-08-12 134756.png

Apparently the timer is never started, so the arbiter never receives a "done" pulse. Incrementing the selection index and keeping it stable once the button is pressed seems to work. Where am I making a mistake here?

Also, is there a more efficient way to achieve the desired behavior?

The project is attached.

0 Likes
1 Reply
lock attach
Attachments are accessible only for community members.
ChRe_4711096
Level 4
Level 4
50 replies posted 25 replies posted 25 sign-ins

It seems to be a problem with the PWM timer. I created a small datapath based dummy coprocessor which

  • waits for a start trigger
  • counts down from 100 to zero
  • generates an output trigger

Anmerkung 2020-08-12 214953.png

and with that, the arbiter waits for the coprocessor to complete its task, and then resumes cycling through the en inputs. What my dev board now does is

  • flash the green LED every time sel_out==0
  • on the press of the button: sel_out cycling is stopped when sel_out==0, so green LED stays on
  • red LED turns on for a second while the coprocessor is busy
  • resume cycling (flashing green LED)

The now working project is attached, but the question why the PWM timer was not starting (see initial post) still remains.

0 Likes