From 883908820e005991336bcfd88fb9afd86f5fec0e Mon Sep 17 00:00:00 2001 From: Cesar Strauss Date: Wed, 8 Jul 2020 06:42:07 -0300 Subject: [PATCH] Start the FSM-based ALU example. --- src/soc/experiment/alu_fsm.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/soc/experiment/alu_fsm.py diff --git a/src/soc/experiment/alu_fsm.py b/src/soc/experiment/alu_fsm.py new file mode 100644 index 00000000..96290f4e --- /dev/null +++ b/src/soc/experiment/alu_fsm.py @@ -0,0 +1,14 @@ +"""Simple example of a FSM-based ALU + +This demonstrates a design that follows the valid/ready protocol of the +ALU, but with a FSM implementation, instead of a pipeline. + +The basic rules are: + +1) p.ready_o is asserted on the initial ("Idle") state, otherwise it keeps low. +2) n.valid_o is asserted on the final ("Done") state, otherwise it keeps low. +3) The FSM stays in the Idle state while p.valid_i is low, otherwise + it accepts the input data and moves on. +4) The FSM stays in the Done state while n.ready_i is low, otherwise + it releases the output data and goes back to the Idle state. +""" -- 2.30.2