Author Topic: ICE40, help with PLL in VHDL  (Read 2395 times)

0 Members and 1 Guest are viewing this topic.

Offline aturcituTopic starter

  • Newbie
  • Posts: 6
  • Country: es
ICE40, help with PLL in VHDL
« on: October 17, 2016, 02:37:01 pm »
Hello,

I am having a bad time trying to instantiate PLLs in my ICE40devBoad. It is the first time I am doing this and all the documentation and the Wizard included in IceCube2 is in Verilog.
Since my project is in VHDL I am trying to figure out how would this be in VHDL.

Basically I need to generate a 25MHZ clock fro ma 12 MHZ one. In verilog this would be achieved by this code

  SB_PLL40_CORE #(.FEEDBACK_PATH("SIMPLE"),
                  .PLLOUT_SELECT("GENCLK"),
                  .DIVR(4'b0001),
                  .DIVF(7'b1000010),
                  .DIVQ(3'b100),
                  .FILTER_RANGE(3'b001),
                 ) uut (
                         .REFERENCECLK(pclk),
                         .PLLOUTCORE(clk),
                         .LOCK(D5),
                         .RESETB(1'b1),
                         .BYPASS(1'b0)
);

Could anyone help me getting this working in VHDL.

Thank you in advance
 

Offline pix3l

  • Regular Contributor
  • *
  • Posts: 83
  • Country: nl
  • Let's pix3l8e
Re: ICE40, help with PLL in VHDL
« Reply #1 on: October 19, 2016, 07:27:49 am »
Are you using Lattice Diamond? If so, you can use the IPexpress to generate the VHDL files
 

Offline ale500

  • Frequent Contributor
  • **
  • Posts: 415
Re: ICE40, help with PLL in VHDL
« Reply #2 on: October 19, 2016, 09:28:04 am »
The ICE parts are supported in Diamond, that's why he is using IceCube2.

Does ICECube2 support mixed language projects ? if so, you can use the verilog module directly.

What you are missing is the generic map (just a guess, I'm a verilog guy).

Code: [Select]

GENERIC MAP (
    FEEDBACK_PATH => "SIMPLE",
    PLLOUT_SELECT =>"GENCLK",
    DIVR => "0001",
    DIVF => "1000010",
    DIVQ => "100",
    FILTER_RANGE => "001"
                 )
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf