element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
FPGA
  • Technologies
  • More
FPGA
Blog Cheap Cyclone 10
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join FPGA to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: michaelkellett
  • Date Created: 31 Jul 2021 2:28 PM Date Created
  • Views 4353 views
  • Likes 15 likes
  • Comments 24 comments
  • fpga design
  • vhdl
  • altera
Related
Recommended

Cheap Cyclone 10

michaelkellett
michaelkellett
31 Jul 2021

I've been following the discussions about the VIDOR4000 in the FPGA group. There was a giveaway associated with the Webinar but of course there will be sonme disapointed non-winners.

 

If you want to get into playing with FPGAs one of the cheapest routes I've found so far is to buy a simple dev board from Aliexpress. There are lots avaialble but this blog is about the Cyclone 10

board from QMTech.

https://www.aliexpress.com/item/1000006634063.html?gps-id=pcStoreJustForYou&scm=1007.23125.137358.0&scm_id=1007.23125.13…

I paid about £16 for mine. I already have a "ByteBlaster" programmer but if you don't it will cost about another £10.

 

The free version of Altera Quartus will do for development.

 

The Cyclone 10 FPGA on this board is smaller than the one on the Vidor board with only about 6k logic elements - but that's enough for useful work.

 

image

 

The board has a 50MHz clock oscillator, a boot Flash chip and a 32MByte SDRAM and the usual regulators for the supply. It comes with a resaonable set of examples which are

extermely useful in getting it running. I downloaded Version 17.1 of Quartus from Intelto match the version used on the board examples. I've also downloaded the 20.1 version for

my own stuff. Running FPGA designs on different versions of the tools often causes problems - so it's best avoided if you can.

The examples are all in Verilog.

 

There's a good blog from  jc2048   at VIDOR 4000: Servo Interface where we have had some discussions about VHDL coding (style and substance image) and a thing that came up

was the possibility of using standard VHDL to infer Block Rams on the FPGA. (The other way is to explicitly refer to the block ram using special IP blocks specific to the FPGA vendor).

 

Having got the LED flasher Verilog demo translated to VHDL I've added a chunk of RAM to the design. It doesn't have anything to do right now so to stop the tools  optimising it away

I've connected it to pins. (Which takes me to another big virtue of the QMTech board, it has about 100 IO pins available on its headers.)

 

This a block diagram of the project. It's done in Aldec-HDL. It's a complete VHDL/Verilog simulator (and more). The block diagram automatically makes all that boring VHDL or Verilog

that links blocks together. The actual code is inside the blocks. I find it helps a great deal to visualise a complex project and saves a lot of time. It isn't free.

 

image

 

This is the RAM code:

 

library IEEE;
use IEEE.std_logic_1164.all;   
use IEEE.NUMERIC_STD.all;


entity mem_inf_sp_64_12 is
     port(
         we : in STD_LOGIC;
         en : in STD_LOGIC;
         clk : in STD_LOGIC;
         address : in STD_LOGIC_VECTOR(5 downto 0);
         data : in STD_LOGIC_VECTOR(11 downto 0);
         q : out STD_LOGIC_VECTOR(11 downto 0)
         );
end mem_inf_sp_64_12;

--}} End of automatically maintained section

architecture mem_inf_sp_64_12 of mem_inf_sp_64_12 is   

    type ram_type is array (0 to 63) of std_logic_vector(11 downto 0);   -- array must be 0 - n, if declared the other way wit downto to match Xilinx example then Quartus fitter fails
    signal ram : ram_type;

begin

    process(clk)
    begin
        if rising_edge(clk) then
            if en = '1' then
                if we = '1' then
                    ram(to_integer(unsigned((address)))) <= data;
                end if;
                q <= ram(to_integer(unsigned((address))));
            end if;
        end if;
    end process;

end mem_inf_sp_64_12;

 

All pure VHDL but note that comment on line 21 - my Xilinx example codes the array "63 downto 0" - I don't have a Xilinx toolset runing so I can't test if they care, but the Altera tools

only infer the block memory one way round.

(There seem to be some extra brackets in lines 31 and 33  - but they do no harm)

 

image

 

The screenshot shows the loveliness of the Altera toolset and the resources used

 

So there you go -  a really cheap (and by FPGA standards, a quite simple) way into FPGA.

 

QMTech do a very similar board (but about twice the price) with an Artix 35 on it - I'll attempt to repeat this experiment when it turns up.

 

MK

  • Sign in to reply

Top Comments

  • michaelkellett
    michaelkellett over 3 years ago in reply to 14rhb +5
    Happy to share ! If anyone buys one of these and needs to talk about I'll (almost always) respond on E14. I suppose I should point out that I have no connection with Aliexpress or QMTech. Just trying to…
  • 14rhb
    14rhb over 3 years ago +4
    When trying to learn electronics on a small budget it can be a difficult decision whether to pay out for a reputable dev board or to opt for a low-cost one via the route you have identified. Therefore…
  • dang74
    dang74 over 3 years ago +4
    Thank you Michael, Three years ago I purchased a Cyclone IV board made by QMTECH. It is the same form factor as your board. I don't remember the exact price but it was very inexpensive and I've put it…
  • Jan Cumps
    Jan Cumps over 3 years ago in reply to Jan Cumps

    I managed to get a design with the block included. But I think the Implementer optimises it out, because I haven't properly provided meaningful inputs and outputs.

     

    image

     

    wrapper code:

    I made something that allows me to put it on the block design. The inputs, outputs and behaviour implementation are bogus.

    I can't use the genmult directly, because Vivado doesn't support "custom types as ports"  or VHDL 2008 code  on the block design.

    The component is the mechanism to get the VHDL 2008 genmult from blog 28 integrated.

     

    library IEEE;
    use IEEE.STD_LOGIC_1164.all;
    use IEEE.NUMERIC_STD.all;
    use work.TYPES_PKG.all;
    
    entity genmult_wrapper is
      port(
        CLK: in STD_LOGIC:='0';
        i_0: in std_logic_vector(1 downto 0);
        o_0: out std_logic_vector(1 downto 0)  
      );
    end genmult_wrapper;
    
    architecture Behavioral of genmult_wrapper is
    
    component genmult is
      generic(LATENCY:INTEGER:=4); -- should be 3 for one DSP48 (up to 27x18) and 4 for two DSP48s (up to 35x27)
      port(CLK:in STD_LOGIC:='0';
        A:in SFIXED(34 downto 0);
        B:in SFIXED(26 downto 0);
        P:out SFIXED(61 downto 0)
      );
    end component;
    
    signal A: SFIXED(34 downto 0);
    signal B: SFIXED(26 downto 0);
    signal P: SFIXED(61 downto 0); -- P can be any size, the result will be resized
    signal r: real;
    
    begin
      g1: GENMULT
        generic map (LATENCY => 4)  
        port map (
          A => A,
          B => B,
          P => P      
        );
    
      -- do  something to try and trick getting the design included ...
      A <= to_sfixed(1.2, 34, 0);
      B <= to_sfixed(1.2, 26, 0);
      o_0(1 downto 0) <= "11";
        
    end Behavioral;

     

    Result:

     

    4. DSP
    ------
    +-----------+------+-------+-----------+-------+
    | Site Type | Used | Fixed | Available | Util% |
    +-----------+------+-------+-----------+-------+
    | DSPs      |    0 |     0 |       220 |  0.00 |
    +-----------+------+-------+-----------+-------+

     

    I'll have to study up some, on DSP (and also on the use use of the type library and VHDL 2008).

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps over 3 years ago in reply to jc2048

    I'm trying to replicate that. I get 2 errors that I'm trying to solve.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • jc2048
    jc2048 over 3 years ago in reply to jc2048

    This is an example of inference from fpgaguru

     

    The Art of FPGA Design - Post 28

     

    This is illustrated for a larger multiplier than one DSP block can manage, but the same principle applies if you keep the wordlengths within what a single multiplier can manage and just end up with a single block used.

     

    fpgaguru deals with the pipelining latency (which I was struggling with - I was going in the right direction, but not quite far enough), and it's done parametrically and using ieee.numeric, so you and Michael should be very happy with it.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • jc2048
    jc2048 over 3 years ago in reply to Jan Cumps

    I can load bitstreams with DSP slices, but I think I can't create designs with them myself.

    You should be able to use the multiplier in the DSP block simply through inference. Ask for a large multiplication, say of two 16 bit signed numeric values, and the synthesis will almost certainly use one of the hardware multipliers in a DSP block rather than build you a hugh, slow mess of a multiplier out of logic.

     

    If you want to try it, you might improve your chances if you start with inputs and outputs clocked, as the DSP block is certainly built to work like that [it's intended to run as one part of a very fast pipeline for maximum clock frequency], though you might find that there's bypassing of the latches in the block on either input or output [I didn't study the documentation beyond looking at the simplified block diagram].

     

    If you're careful, you should then be able to extend that and infer the proper use of the accumulator with the multiplier as a MAC, and start doing simple filter stuff, all without touching any IP.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps over 3 years ago in reply to michaelkellett

    The good thing is that you can have several versions on the same computer.

    The bad news is that you have to say bye-bye to many hours of your life and decent hard disk real estate for that.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube