- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi there!
Recently purchased board from Aliexpress with EPM570T100C5 in it
Just programmed simple overflow accumulator as used in old fractional N synthesizer schemes. Mine with registered ouput for overflow so is one clock delayed.
`timescale 1ns/1ps
`define clk_period 20
module testbench;
reg clk;
reg reset;
reg [3:0] prog;
wire [3:0] add;
wire clk9600;
wire overflow;
frac_acc uut(.clk(clk), .reset(reset), .clk9600(clk9600), .prog(prog), .overflow(overflow), .add(add));
initial clk = 1'b1;
always #(`clk_period/2) clk = ~clk;
initial begin
reset=1;
#105000
reset=0;
#20;
prog = 4'b0000;
#10;
prog = 4'b0001;
#380000
reset=1;
#440000
reset=0;
end
endmodule
Problem arrives when i program into board... Instead of each 16 cicles; above is true just for half cicles, as if adder was 3 bits not 4.
So if i want actual chip to behave as per image, i need to set add[4:0] and prog[4..0] and reprogramm it, and so on
Anyone has experiences such behavior?
besides above, seems if input pins are not tied to ground it doesnt read as 0, so need tie to gnd for propper operation, no sure if pull down resistor or pin type is in order here.
Thanks!
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi FvM
Yep, that did the trick
always @(posedge clk) begin
if (c>=5207)
c<=0;
else
c<=c+1;
clk9600 <= (c <= (5208/2)-1)? 1'b1:
1'b0;
end
The change added output through flip flop as per rtl netlist. so whatever glitch happened at logic it was stable after delayed clock. Its not first time i experience glitches, on this same design the carry propagation delay does a glitch, bigger chance when more adders in series, but after passing trough one clk delay it gives the room stabilize logic level so it is valid.
Im quite new on quartus and didnt see the glitches on real scope at first, and since simulation appeared fine i was a little puzzled.
I wish i know how to account for glitches at simulation level...
Thanks!
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page