Jump to content
  • 0

State machine vs Microblaze MCU


That_Guy

Question

So my current project is very simple, but I've yet to settle on how the control logic is going to be implemented. I think the FSM and Microblaze are both perfectly viable solutions, but I want to find the intersection of maximum learning and minimum complexity.

The controller will be performing three tasks:
-Pass alternating I and Q data from another module via usb to the user.
-Receive data from the user via usb to set a desired frequency.
-Interface with the clocking manager to request the new frequency.

I am sure I could create an FSM to accomplish this, the USB controller has already been done, my hesitation is a lack of understanding of the AXI4 and DRP interfaces.

I am familiar with 8-bit RISC AVR microcontroller, and if given a similar structure, I would think designing with a microcontroller would be almost trivial, but there is surely a learning curve to climb.

The question boils down in my mind to a balance between the complexity of the FSM and the learning curve of Microblaze. I also am inclined to say some introductory experience with Mircroblaze would likely be desirable for a future employer. 

What do you think would be a better opportunity for learning?

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

Hi,

I suspect the complexity is far below the break-even point where the more complex architecture pays off.
Making it work may even take a comparable amount of time, but you'll have to manage a design in more dimensions (user RTL, MCU, embedded code) compared to a simple "flat" RTL design.

The MCU may create several problems (e.g. need for FIFOs, clock domain crossings) that can be avoided completely with a FSM.

If you haven't done this repeatedly, it may take a little time to get fluent with coding FSMs in RTL. Until then, you may find you're biased towards "traditional" procedural programming, even though a plain Verilog FSM is often more concise and intuitive (opinion).

For learning, why not try both. Bringing up a quick-and-dirty functional prototype shouldn't be that much work.

And check what happens to the project build time when adding the MCU. Software changes are quick, though.


Link to comment
Share on other sites

In my humble opinion, FSM is the best architecture for the supervisory controller regardless of its implementation.
Since the poster indicated AVR (C-code) experience I believe that using Microblaze would be easier or less time consuming because pretty much everything can be accomplished in C-code.

However, without knowing the requirements specification this is just my opinion based on personal experience.

It should be mentioned that Xilinx provides FSM templates for both VHDL and Verilog. Also, it is imperative to simulate FSM to make sure that it doesn't have dead states.
Simulink Stateflow is a good tool for designing FSMs. C-code implementations of FSMs could be found in textbooks.

Link to comment
Share on other sites

Microblaze is not difficult to work with. All tools and work flow sequences are basically identical to the tools and sequences used with Zybo Z7 embedded processor. You can nicely program in C. AXI modules become accessible in the address space and easy to deal with. 

From the other side, Microblaze is a rather slow single core CPU that, by itself, will not bring performance benefits normally associated with FPGA. If you just need an embedded CPU for your task, there are cheaper devices available.

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...