Author Topic: Looking for Help with CPLD and Quartus II  (Read 4047 times)

0 Members and 1 Guest are viewing this topic.

Offline MatCatTopic starter

  • Frequent Contributor
  • **
  • Posts: 377
  • Country: us
Looking for Help with CPLD and Quartus II
« on: April 14, 2014, 07:42:20 am »
I am trying to experiment with CPLDs, and in-fact have a potential use for one that I have been testing in the sim, now my next step was to see exactly how many LE's it would take for my design and figure out how pin assignments work, but for the life of me I cannot figure out how it works.  My project just consists of a singular .v file for the verilog, if I go to the pin editor I can see the pins graphically layed out according the the chip I want to use, but I have no idea how to assign them or use them, any help would be greatly appreciated.

 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: Looking for Help with CPLD and Quartus II
« Reply #1 on: April 14, 2014, 07:58:12 am »
All you need (and it will take a while to learn) is in here:

http://www.altera.com/education/training/curriculum/cpld/trn-cpld.html

I'm on the fpga front so I'm using:

http://www.altera.com/education/training/curriculum/fpga/trn-fpga.html

But it should be similar.
 

Online jahonen

  • Super Contributor
  • ***
  • Posts: 1054
  • Country: fi
Re: Looking for Help with CPLD and Quartus II
« Reply #2 on: April 14, 2014, 08:02:21 am »
Have you compiled your design for the chip you are planning to use? After successful compilation, the pin planner should provide a list of assignable pins in bottom of the pin planner window. Then simply type the desired pin number for each pin into "Location" column.

Although you could enter the pin assignments beforehand by adding node names manually, it is usually better to see first where fitter likes to put them. Then you can either back-annotate the fitter selections or assign different pin.

Regards,
Janne
 

Offline MatCatTopic starter

  • Frequent Contributor
  • **
  • Posts: 377
  • Country: us
Re: Looking for Help with CPLD and Quartus II
« Reply #3 on: April 14, 2014, 08:57:40 am »
Have you compiled your design for the chip you are planning to use? After successful compilation, the pin planner should provide a list of assignable pins in bottom of the pin planner window. Then simply type the desired pin number for each pin into "Location" column.

Although you could enter the pin assignments beforehand by adding node names manually, it is usually better to see first where fitter likes to put them. Then you can either back-annotate the fitter selections or assign different pin.

Regards,
Janne
I see what was happening, the module I used as my testbench module I modified it for compile test but I failed since it contained no actual logic methods so I couldn't compile.  I think I have an idea now of how this all works :).
 

Offline MatCatTopic starter

  • Frequent Contributor
  • **
  • Posts: 377
  • Country: us
Re: Looking for Help with CPLD and Quartus II
« Reply #4 on: April 14, 2014, 08:57:55 am »
All you need (and it will take a while to learn) is in here:

http://www.altera.com/education/training/curriculum/cpld/trn-cpld.html

I'm on the fpga front so I'm using:

http://www.altera.com/education/training/curriculum/fpga/trn-fpga.html

But it should be similar.
I will take a look at that, thanks!
 

Offline MatCatTopic starter

  • Frequent Contributor
  • **
  • Posts: 377
  • Country: us
Re: Looking for Help with CPLD and Quartus II
« Reply #5 on: April 14, 2014, 08:01:35 pm »
Ok so I am at another brick wall, I am now trying to do a simple PWM Driver (not completed yet, will eventually have multiple PWM outputs), I have a PWM module, a shift register input for serial data, and a top level to tie it all together, problem is when I try to compile it I get the design does not contain any logic, no errors or warnings otherwise other then the fact that I have no license for parallel compiling, why?

Code: [Select]
module PWMMAIN;
reg sclk;
reg clk;
reg latch;
reg sdata;
reg reset;
wire p0out;
reg [11:0] p0data;
wire [5:0] pwmAddr;
wire [11:0] pwmData;

PWM p0 (.clk (clk),.reset (reset),.data (p0data),.out (p0out));
SHIFTIN sd (.sclk (sclk), .latch (latch),.data (sdata), .addr (pwmAddr),.data_out (pwmData));

always @(posedge latch)
p0data <= pwmData;
endmodule

module PWM(clk,reset,data,out);
input clk;
input reset;
input [11:0] data;
output out;
reg out;
reg [11:0] pwmclk;

always @(posedge clk)
if (reset) begin
pwmclk <= 12'b0;
end else begin
if (pwmclk < data) begin
out <= 1;
end else begin
out <= 0;
end
pwmclk <= pwmclk + 1'b1;
end
endmodule

module SHIFTIN(sclk,latch,data,addr,data_out);
input sclk;
input latch;
input data;
output [11:0] data_out;
output [5:0] addr;
reg [5:0] bitCount;
reg [5:0] addr;
reg [11:0] data_out;

always @(posedge sclk or posedge latch)
if (latch) begin
bitCount <= 0;
end else begin
if (bitCount < 5) begin
// Address
addr <= addr << 1;
addr[0] <= data;
end else begin
// Data
data_out <= data_out << 1;
data_out[0] <= data;
end
bitCount <= bitCount + 1'b1;
end

endmodule
 

Offline marshallh

  • Supporter
  • ****
  • Posts: 1462
  • Country: us
    • retroactive
Re: Looking for Help with CPLD and Quartus II
« Reply #6 on: April 14, 2014, 10:55:54 pm »
On the very first line you have instantiated a new module except with no i/o -- you forgot the parentheses. So it thinks your toplevel is completely empty.
Verilog tips
BGA soldering intro

11:37 <@ktemkin> c4757p: marshall has transcended communications media
11:37 <@ktemkin> He speaks protocols directly.
 

Offline MatCatTopic starter

  • Frequent Contributor
  • **
  • Posts: 377
  • Country: us
Re: Looking for Help with CPLD and Quartus II
« Reply #7 on: April 15, 2014, 12:59:55 am »
On the very first line you have instantiated a new module except with no i/o -- you forgot the parentheses. So it thinks your toplevel is completely empty.
Yep, all of the examples I have been reading on the internet use sim and the top level never has I/O in that case (testbench), putting proper I/O did fix it.
 

Offline ktulu

  • Regular Contributor
  • *
  • Posts: 52
Re: Looking for Help with CPLD and Quartus II
« Reply #8 on: September 13, 2017, 10:18:59 am »
Hi.
I'm trying to read back a MaxII EMP570 with QuartusII and ByteblasterMV.
I attach the resulting .pof file.
The entire CFM region is all 0's. Interestingly the security bit is not checked in QuartusII programmer after executing a read.
Can somebody tell me what is the cause?
I'm guessing it is code protected. Is there any way to verify this, and tell for sure?
(I've tried many different versions of QuartusII btw.)
Thanks.
 

Offline ktulu

  • Regular Contributor
  • *
  • Posts: 52
Re: Looking for Help with CPLD and Quartus II
« Reply #9 on: September 13, 2017, 06:27:03 pm »
If I try to verify, it always fails at 7% (right after an examine)
Any idea?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf