www.delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2011/11/28/23:01:24

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
Date: Mon, 28 Nov 2011 23:01:09 -0500
From: gene glick <geneglick AT optonline DOT net>
Subject: Re: [geda-user] Modern GAL/PAL design with gEDA?
In-reply-to: <20111128150702.2c75a231@rainbird>
To: geda-user AT delorie DOT com
Cc: Vanessa Ezekowitz <vanessaezekowitz AT gmail DOT com>
Message-id: <4ED45905.9090403@optonline.net>
MIME-version: 1.0
References: <20111117204524 DOT 10e586f5 AT rainbird> <4EC5CBEE DOT 5060904 AT optonline DOT net>
<CAN0Jx-84K3n+g+ZH29wjzkuusBa=Bk_F=SaY+Z=fdm-JTf=HKQ AT mail DOT gmail DOT com>
<20111120162218 DOT 555bc069 AT rainbird> <4ECA9BF9 DOT 9000601 AT ecosensory DOT com>
<20111128150702 DOT 2c75a231 AT rainbird>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.15) Gecko/20110323
Thunderbird/3.1.9
Reply-To: geda-user AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: geda-user AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On 11/28/2011 03:07 PM, Vanessa Ezekowitz wrote:
>
> Well after a week of wrangling with this, I finally turned out a working design - or at least, it simulates (iverilog + gtkwave) *and* synthesizes properly (ispLEVER under a virtual machine).  The funny part is, the final result (barring any last-minute bugs) is far smaller than what I first came up with.
>
> As an aside:  whoever wrote ispLEVER's error messages needed a lesson in user friendliness. :-)
>
> For those interested, the Verilog code is attached.
>

Vanessa,

1st - congrats!

2nd - I think those parts have gone obsolete at lattice semi :(  But, it 
looks like atmel has them and also TI (quick check on digikey).

Yes, the great thing about HDL is the tools are probably going to be 
much better at deMorgan than most people.  They *usually* generate 
pretty efficient stuff - not always though.  But the beauty is you write 
the code as it makes the most sense to you.  The synthesis tools do all 
the heavy work.  If you find it doesn't fit, you can play games to optimize.

A couple of code suggestions:

You wrote:

always @(posedge Phi2_Inv_In) begin
   if (A1 & A2 & ~A0 & ~RW & ~IO2) CASBankSel <= D3;
   Q <= ~RAS0In & CAS0In;
end

But do not explicitly say what to do for the else portion. For example:

always @(posedge Phi2_Inv_In) begin
   if (A1 & A2 & ~A0 & ~RW & ~IO2)
	CASBankSel <= D3;
   else
	CASBankSel <= CASBankSel;

   Q <= ~RAS0In & CAS0In;
end


Oh, and you have no reset state.  Maybe a problem, maybe not - depends 
on the design.  As far as I can see, your 2 flip-flops will power up as 
the chip likes.  Some FPGA's have built-in default power up state but 
it's bad practice to rely on it.  Just a suggestion.

Anyway - have fun with it.

gene




- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019