FPGA Central - World's 1st FPGA / CPLD Portal

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > FPGA

FPGA comp.arch.fpga newsgroup (usenet)

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-02-2003, 12:00 AM
Maciek
Guest
 
Posts: n/a
Default Altera Devices

Hi !
Is this possible, to implement function with 4 inputs, 1 output using
also DFFE component with clk, ena and preset signals provided in one Logic
Cell ??
I mean, can code listed below be compiled to use less than 2 cells of
resources ?? I always thought, that controlling signals for latches in Logic
Cells don't increase of resource utility.
SUBDESIGN c_cell
(
clk :INPUT;
ena :INPUT;
reset :INPUT;
c_prev :INPUT;
b[0..1] :INPUT;
a :INPUT;
q :OUTPUT;
)

VARIABLE
q FFE;
BEGIN
q.clk = clk;
q.ena = ena;
q.clrn = reset;
q.d = c_prev $ (a&(b0$b1));
q = q;
END;



Reply With Quote
  #2 (permalink)  
Old 09-02-2003, 09:44 AM
Martin Thompson
Guest
 
Posts: n/a
Default Re: Altera Devices

"Maciek" <[email protected]> writes:

> Hi !
> Is this possible, to implement function with 4 inputs, 1 output using
> also DFFE component with clk, ena and preset signals provided in one Logic
> Cell ??
> I mean, can code listed below be compiled to use less than 2 cells of
> resources ?? I always thought, that controlling signals for latches in Logic
> Cells don't increase of resource utility.


Hi Maciek,

What device are you targetting?

The older (10K/1K) series don't have dedicated clock enable signals,
or synchronous presets/clears, so they take up one of your inputs
each.

This changed with later devices, eg Apex has dedicated CE inputs for
the LE, and LAB wide synch clear and load signals. The data that is
loaded uses the d3 input still.

Looking at the Cyclone datasheet, it seems to be similar to Apex in
that regard.

Does that help?

Cheers,
Martin

--
[email protected]
TRW Conekt, Solihull, UK
http://www.trw.com/conekt
Reply With Quote
  #3 (permalink)  
Old 09-02-2003, 04:24 PM
Maciek
Guest
 
Posts: n/a
Default Re: Altera Devices

> Hi Maciek,
>
> What device are you targetting?
>
> The older (10K/1K) series don't have dedicated clock enable signals,
> or synchronous presets/clears, so they take up one of your inputs
> each.
>
> This changed with later devices, eg Apex has dedicated CE inputs for
> the LE, and LAB wide synch clear and load signals. The data that is
> loaded uses the d3 input still.
>
> Looking at the Cyclone datasheet, it seems to be similar to Apex in
> that regard.
>
> Does that help?
>
> Cheers,
> Martin

Hi Martin!
Thank You for Your suggestion about checking the targeting device. I
still don't know how to use AHDL to take advantage of dedicated control
inputs in Apex devices, but I think I will solve this problem soon.
Regards,
Maciek



Reply With Quote
  #4 (permalink)  
Old 09-02-2003, 11:17 PM
Subroto Datta
Guest
 
Posts: n/a
Default Re: Altera Devices

"Maciek" <[email protected]> wrote in message news:<bj0c04$vn2$[email protected]>...
> Hi !
> Is this possible, to implement function with 4 inputs, 1 output using
> also DFFE component with clk, ena and preset signals provided in one Logic
> Cell ??
> I mean, can code listed below be compiled to use less than 2 cells of
> resources ?? I always thought, that controlling signals for latches in Logic
> Cells don't increase of resource utility.
> SUBDESIGN c_cell
> (
> clk :INPUT;
> ena :INPUT;
> reset :INPUT;
> c_prev :INPUT;
> b[0..1] :INPUT;
> a :INPUT;
> q :OUTPUT;
> )
>
> VARIABLE
> q FFE;
> BEGIN
> q.clk = clk;
> q.ena = ena;
> q.clrn = reset;
> q.d = c_prev $ (a&(b0$b1));
> q = q;
> END;


Hi Maciek,

Change the code as follows :

VARIABLE
my_reg FFE;

Instead of

VARIABLE
q FFE;

my_reg.clk = clk;
.....
.....
q = my_reg.q and it should work (i.e. fit in one Logic Cell).. I
checked it for the APEX, Stratix and Cyclone families.

- Subroto Datta
Altera Corp.
Reply With Quote
  #5 (permalink)  
Old 09-03-2003, 09:53 AM
Martin Thompson
Guest
 
Posts: n/a
Default Re: Altera Devices

"Maciek" <[email protected]> writes:

> > Hi Maciek,
> >
> > What device are you targetting?
> >
> > The older (10K/1K) series don't have dedicated clock enable signals,
> > or synchronous presets/clears, so they take up one of your inputs
> > each.
> >
> > This changed with later devices, eg Apex has dedicated CE inputs for
> > the LE, and LAB wide synch clear and load signals. The data that is
> > loaded uses the d3 input still.
> >
> > Looking at the Cyclone datasheet, it seems to be similar to Apex in
> > that regard.
> >
> > Does that help?
> >
> > Cheers,
> > Martin

> Hi Martin!
> Thank You for Your suggestion about checking the targeting device. I
> still don't know how to use AHDL to take advantage of dedicated control
> inputs in Apex devices, but I think I will solve this problem soon.


I think (although I'm not an AHDL man myself) that your code ought to
do the right thing, *if* the device you're targetting has a
capability... I've bashed in what I think your HDL is doing as a
schematic (Quartus II 2.2). If you'd like a copy of the file, let me
know by email and I'll send it you.

Targetting a Cyclone device it produces one LUT and a FF:

From the EQN file...
inst_lut_out = c_prev # a & (b0 # b1);
inst = DFFEA(inst_lut_out, GLOBAL(CLK), GLOBAL(RESETn), CKE, , );

Running your AHDL file produced 2 LUTs, as you said, which seems wrong
- I'd open a case with Altera obout it...

Just for completeness, targetting a 1K (Acex) gives:

inst_lut_out = A1L8;
inst = DFFEA(inst_lut_out, GLOBAL(CLK), GLOBAL(RESETn), , CKE, , );
A1L8 = c_prev # a & (b1 # b0);

thereby using two LEs.

It's not easy to see in the floorplanner what's going on, as both
devices claim to be using a DFFE with a clock enable pin, but you
can;t see the way that the 3rd input is being used as that CKE signal
in the 1K architecure. Why do we not have an FPGA Editor for Altera
for tracking these low-level things down...?

Oh well, hope that helps a little!

Cheers,
Martin

--
[email protected]
TRW Conekt, Solihull, UK
http://www.trw.com/conekt
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 01:03 AM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved