6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun May 12, 2024 12:58 am

All times are UTC




Post new topic Reply to topic  [ 21 posts ]  Go to page Previous  1, 2
Author Message
 Post subject:
PostPosted: Sun Oct 31, 2010 10:27 pm 
Offline

Joined: Sat Jan 04, 2003 10:03 pm
Posts: 1706
Not using a Wishbone-compliant bus prevents you from directly connecting Wishbone peripherals (e.g., vga controllers, various UARTs or other communications products), which is the OpenCores.org standard.

But, since Wishbone and 65xx buses are very nearly identical, making a bridge shouldn't be too hard. And, by nearly identical, I mean they're almost isomorphic:

* CYC_O corresponds with (VPA | VDA), where | represents binary-OR.
* STB_O is, because the bus is only 8 bits wide, the same as CYC_O.
* OE_O is R/W inverted.
* CLK_I is phase-1 (or phase-2 inverted)
* ACK_I is RDY

All that stuff about tags, multiple byte lanes, etc. you needn't concern yourself over, since you're not making a wider bus with error correction.

Overall bus timings are a little bit different, but I seem to recall only few cases where they're at all incompatible (e.g., handling of ABORT, if you support that at all, maps to Wishbone's ERR_I, yet isn't compatible with Wishbone because it's sampled on the wrong clock edge).

re: 65816 -- EF is the external emulation flag -- it's set when running in 6502 mode, and cleared otherwise. If you have external hardware that provides interrupt vectors dynamically (e.g., as the Apple IIgs does), this signal is used to determine whether to intercept $00FFEx vs. $00FFFx.

MF and XF are the M and X status indicators, indicating accumulator and index register widths. This is required knowledge if you're attempting to use external hardware to intercept opcode fetches and you need to determine how big the operand is going to be.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Nov 01, 2010 6:15 am 
Offline
User avatar

Joined: Fri Dec 12, 2003 7:22 am
Posts: 259
Location: Heerlen, NL
kc5tja wrote:
re: 65816 -- EF is the external emulation flag .....

Thank you for clarifying this, I completely forgot about that.

_________________
Code:
    ___
   / __|__
  / /  |_/     Groetjes, Ruud
  \ \__|_\
   \___|       URL: www.baltissen.org



Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Nov 01, 2010 6:46 pm 
Offline
User avatar

Joined: Fri Dec 12, 2003 7:22 am
Posts: 259
Location: Heerlen, NL
Rewritten cores II

I updated RB65, found two bugs:
http://www.baltissen.org/vhdl/RB65.vhd

I also uploaded:
http://www.baltissen.org/vhdl/RB65-ISE.vhd
It simplifies testing RB65 with ISE.

http://www.baltissen.org/vhdl/RB65_ISE.syr
Here you can see the output of ISE. If somebody can explain it a bit to me, that would be great! I am mainly interested in those things that I can connect directly to my design.

_________________
Code:
    ___
   / __|__
  / /  |_/     Groetjes, Ruud
  \ \__|_\
   \___|       URL: www.baltissen.org



Last edited by Ruud on Tue Nov 02, 2010 7:06 am, edited 2 times in total.

Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Nov 01, 2010 6:58 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10800
Location: England
Hi Ruud
thanks for sharing your synthesis report file.

You should always check the warnings, and ideally get rid of them. Otherwise the tool might misbehave, or the synthesis might not match the simulation.

The first resource tabulation is
Code:
Summary:
   inferred   1 ROM(s).
   inferred 141 D-type flip-flop(s).
   inferred  21 Adder/Subtractor(s).
   inferred   3 Comparator(s).
   inferred  45 Multiplexer(s).

and it's worth checking that against your expectations and perhaps against other implementations - or your previous revisions.

And then the same again, for the next tabulation ("Advanced HDL Synthesis Report")
Code:
Macro Statistics
# ROMs                                                 : 1
 4x20-bit ROM                                          : 1
# Adders/Subtractors                                   : 19
 16-bit adder                                          : 5
 5-bit adder                                           : 3
 5-bit adder carry in                                  : 2
 8-bit adder                                           : 4
 8-bit addsub                                          : 3
 8-bit subtractor                                      : 2
# Registers                                            : 145
 Flip-Flops                                            : 145
# Latches                                              : 1
 8-bit latch                                           : 1
# Comparators                                          : 3
 5-bit comparator greater                              : 2
 8-bit comparator less                                 : 1
# Multiplexers                                         : 5
 1-bit 8-to-1 multiplexer                              : 1
 20-bit 8-to-1 multiplexer                             : 1
 8-bit 4-to-1 multiplexer                              : 2
 8-bit 8-to-1 multiplexer                              : 1
# Xors                                                 : 3
 1-bit xor2                                            : 2
 8-bit xor2                                            : 1

You might ask yourself, in this case, why you have 5 16-bit adders. You'll need to review your HDL and maybe do some research, but this is an example of a question worth answering.

Finally, it can be interesting to look at the timing report, to see how complex the logic trees are:
Code:
Delay:               15.102ns (Levels of Logic = 16)
  Source:            RB1/Operation_12 (FF)
  Destination:       RB1/PC_9 (FF)
  Source Clock:      PHID rising
  Destination Clock: PHID rising

It might be worth trying to see where those 16 levels of logic come from, if the timing isn't as good as you expect, or maybe as a way to understand the area usage. Maybe the pipelining hasn't come out as you expect.

Essentially, you're looking for reasons why things have turned out more complex than you expected.

Hope this helps
Ed


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Dec 24, 2010 11:31 am 
Offline
User avatar

Joined: Fri Dec 12, 2003 7:22 am
Posts: 259
Location: Heerlen, NL
Hallo allemaal,


I just found two HUGE bugs in RB65 :( I found them while testing RB65816. PLx and RTI are concerned. By coincidence, when placed in the right order, they eliminate each other. And that's just what happened in the test ASM for RB65. The combination still produces other errors but my test isn't that lowlevel anymore at that stage.

I cannot upload the improved version until tomorrow, maybe this afternoon.

_________________
Code:
    ___
   / __|__
  / /  |_/     Groetjes, Ruud
  \ \__|_\
   \___|       URL: www.baltissen.org



Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Dec 24, 2010 9:30 pm 
Offline
User avatar

Joined: Fri Dec 12, 2003 7:22 am
Posts: 259
Location: Heerlen, NL
I updated RB65 as promised:
http://www.baltissen.org/vhdl/RB65.vhd

I also updated:
http://www.baltissen.org/vhdl/RB65816.vhd

_________________
Code:
    ___
   / __|__
  / /  |_/     Groetjes, Ruud
  \ \__|_\
   \___|       URL: www.baltissen.org



Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 21 posts ]  Go to page Previous  1, 2

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: