+ Post New Thread
Results 1 to 10 of 10
  1. #1
    Full Member level 2
    Points: 1,404, Level: 8

    Join Date
    Jun 2014
    Posts
    135
    Helped
    0 / 0
    Points
    1,404
    Level
    8

    Design a 4-core processor on FPGA

    Hello,

    How feasible it is to design a 4-core cpu on a FPGA Spartan 3E. I don't want to design something complicated, but a processor to test a few algorithms, designed for embedded, how fast they can run on FPGA...

    Thank you.

  2. #2
    Advanced Member level 5
    Points: 36,882, Level: 46
    Achievements:
    7 years registered

    Join Date
    Jun 2010
    Posts
    6,729
    Helped
    1963 / 1963
    Points
    36,882
    Level
    46

    Re: Design a 4-core processor on FPGA

    It depends how complicated your CPU is....



    •   AltAdvertisment

        
       

  3. #3
    Member level 5
    Points: 650, Level: 5

    Join Date
    Dec 2017
    Location
    Bydgoszcz - Poland
    Posts
    80
    Helped
    16 / 16
    Points
    650
    Level
    5

    Re: Design a 4-core processor on FPGA

    Quote Originally Posted by adwnis123 View Post
    Hello,

    How feasible it is to design a 4-core cpu on a FPGA Spartan 3E. I don't want to design something complicated, but a processor to test a few algorithms, designed for embedded, how fast they can run on FPGA...

    Thank you.
    Hello,

    the simplest one is "Picoblaze" (Xilinx). It is simple 8-bit CPU:

    https://www.xilinx.com/support/docum...tion/ug129.pdf

    Every instruction is executed in two clock cycles. I tested it on Spartan3A and it can properly works with 180 MHz clock. So one can get 90 MIPS (8-bit data).

    You can run four instances of Picoblaze on your FPGA board, but there isn't working 'C compiler' for Picoblaze (you have to program it in assembler).

    Ther4e are many free designs of CPU on opencores.org:

    https://opencores.org/projects?expanded=Processor

    You can also use 32-bit CPus from Xilinx or Intel or Lattice (Microblaze, NIOSII,Mico32). There is also available ARM-CortexM3 as soft-core (but it needs big FPGA to run). For these all 32-bit CPUs are available C compilers.

    Regards
    Last edited by FlyingDutch; 7th December 2018 at 17:33.


    1 members found this post helpful.

  4. #4
    Full Member level 1
    Points: 1,502, Level: 8

    Join Date
    Nov 2013
    Posts
    115
    Helped
    27 / 27
    Points
    1,502
    Level
    8

    Re: Design a 4-core processor on FPGA

    The number os cores you can place in a FPGA is directly related to the amount of available logic you have.

    So, it really depends of which FPGA you will chose inside 3E family. a XC3S100E hardly will support 4-cores, but a bigger FPGA may support it, depending of the complexity of the core.

    Also, there is achoice to be done: if you suport external buses (for example, for parallel flashes, RAM) or will use internal BRAM only. If you use external buses, you increase core complexity. But if you use internal BRAM only you are very limitted regarding code size and RAM memory.

    If you are trying to do this for learning purposes, good. But keep in mid you can reuse a core already developed. For example, there are some free cores available on opencores.org. They can be used as reference for your new core as well.

    Good luck.


    1 members found this post helpful.

    •   AltAdvertisment

        
       

  5. #5
    Full Member level 2
    Points: 1,404, Level: 8

    Join Date
    Jun 2014
    Posts
    135
    Helped
    0 / 0
    Points
    1,404
    Level
    8

    Re: Design a 4-core processor on FPGA

    Thank you for your answers. I am looking it....

    I want to assign the load to each core, according to a algorithm I have designed. Is it feasible to control each core?



  6. #6
    Advanced Member level 2
    Points: 4,071, Level: 15

    Join Date
    Feb 2014
    Posts
    526
    Helped
    191 / 191
    Points
    4,071
    Level
    15

    Re: Design a 4-core processor on FPGA

    The thing to understand about the FPGA is that you have total freedom over what your cores do (their instructions), their size and how many you have. You could design a turing complete 1 bit core and probably fit 1000 of them running at 200mhz in your spartan. Or you can have one big 32 bit core. That's the flexibility an FPGA offers you (And if you're not doing something special you're probably much better off with a traditional multi-core processor).


    1 members found this post helpful.

    •   AltAdvertisment

        
       

  7. #7
    Full Member level 2
    Points: 1,404, Level: 8

    Join Date
    Jun 2014
    Posts
    135
    Helped
    0 / 0
    Points
    1,404
    Level
    8

    Re: Design a 4-core processor on FPGA

    I use 500E FPGA. Can I just "copy-paste" the pico-blaze 1-core processor 4 times to make it 4-core and of course configure it, to work properly?



  8. #8
    Member level 5
    Points: 650, Level: 5

    Join Date
    Dec 2017
    Location
    Bydgoszcz - Poland
    Posts
    80
    Helped
    16 / 16
    Points
    650
    Level
    5

    Re: Design a 4-core processor on FPGA

    Quote Originally Posted by adwnis123 View Post
    I use 500E FPGA. Can I just "copy-paste" the pico-blaze 1-core processor 4 times to make it 4-core and of course configure it, to work properly?
    Hello,

    theoretically yes, but remember that Picoblze program memory is in one of HDL files of your project (VHDL or verilog). It is generated by Picoblaze assembler program.You also should be aware of Input/Output ports of every instance of picoblaze CPU. If your algorithm needs comunication beetwen cores you have to "program" it manually in HDL project.

    regards


    1 members found this post helpful.

  9. #9
    Full Member level 2
    Points: 1,404, Level: 8

    Join Date
    Jun 2014
    Posts
    135
    Helped
    0 / 0
    Points
    1,404
    Level
    8

    Re: Design a 4-core processor on FPGA

    Something else. How can I find what elements of a processor, does an algorithm take care in order to assign (in multi-core processors) the load to each core?

    Thank you.



  10. #10
    Member level 5
    Points: 650, Level: 5

    Join Date
    Dec 2017
    Location
    Bydgoszcz - Poland
    Posts
    80
    Helped
    16 / 16
    Points
    650
    Level
    5

    Re: Design a 4-core processor on FPGA

    Quote Originally Posted by adwnis123 View Post
    Something else. How can I find what elements of a processor, does an algorithm take care in order to assign (in multi-core processors) the load to each core?

    Thank you.
    Hello,

    you have to "program" it in your HDL project. By default each instance of Picoblaze program memory is saved in HDL file. As far as I remember there is also "bootloader" for Picoblaze (in HDL language). So for example you can send code for execution (program) to instance of Picoblaze by UART and execute it. But you have to "program" that all in your FPGA project.

    Regards



--[[ ]]--