Click Here
home features news forums classifieds faqs links search
6071 members 
Amiga Q&A /  Free for All /  Emulation /  Gaming / (Latest Posts)
Login

Nickname

Password

Lost Password?

Don't have an account yet?
Register now!

Support Amigaworld.net
Your support is needed and is appreciated as Amigaworld.net is primarily dependent upon the support of its users.
Donate

Menu
Main sections
» Home
» Features
» News
» Forums
» Classifieds
» Links
» Downloads
Extras
» OS4 Zone
» IRC Network
» AmigaWorld Radio
» Newsfeed
» Top Members
» Amiga Dealers
Information
» About Us
» FAQs
» Advertise
» Polls
» Terms of Service
» Search

IRC Channel
Server: irc.amigaworld.net
Ports: 1024,5555, 6665-6669
SSL port: 6697
Channel: #Amigaworld
Channel Policy and Guidelines

Who's Online
40 crawler(s) on-line.
 33 guest(s) on-line.
 0 member(s) on-line.



You are an anonymous user.
Register Now!
 vox:  5 mins ago
 Karlos:  13 mins ago
 matthey:  16 mins ago
 zipper:  23 mins ago
 m0lebrain:  48 mins ago
 OneTimer1:  58 mins ago
 V8:  1 hr 12 mins ago
 pavlor:  1 hr 28 mins ago
 kamelito:  1 hr 38 mins ago
 kolla:  1 hr 45 mins ago

/  Forum Index
   /  Amiga General Chat
      /  New Classic Amiga market?
Register To Post

Goto page ( Previous Page 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 )
Poll : Name?
New Classic Amiga
Advance Amigas
Enchanced Amigas
Amiga Plus
68k+
ClassicNG
Pancake Amiga Market
 
PosterThread
cdimauro 
Re: New Classic Amiga market?
Posted on 2-Aug-2024 6:08:57
#161 ]
Elite Member
Joined: 29-Oct-2012
Posts: 3957
From: Germany

@michalsc

Quote:

michalsc wrote:
@matthey

Quote:
After pondering for awhile, my initial thought is that a DSB instruction alone is adequate for interpreted emulation where the result of each instruction is obtained before the next instruction is interpreted. This effectively serializes the execution of code as if the execution was not pipelined. This is similar to using an ISB instruction after every executed instruction.


You are probably right and I might add ISB there. For me the DSB was much more important as memory barriers are essential when dealing with MMIO registers. But you are right, letting it empty the pipeline might be a good thing to do.

Why is it needed? What issue could happen if you don't empty the pipeline from the code that you've generated?

To me it looks like that DSB should be enough: data need to be synchronized.

ISB, on the other hand, looks redundant.

 Status: Offline
Profile     Report this post  
michalsc 
Re: New Classic Amiga market?
Posted on 2-Aug-2024 7:36:29
#162 ]
AROS Core Developer
Joined: 14-Jun-2005
Posts: 390
From: Germany

@cdimauro

Quote:
Why is it needed? What issue could happen if you don't empty the pipeline from the code that you've generated?


That depends on how I will implement e.g. MMU. There, instruction barrier might be important, or not. It will be not important if I will issue ISB already in the translated code turning MMU on/off.

 Status: Offline
Profile     Report this post  
matthey 
Re: New Classic Amiga market?
Posted on 3-Aug-2024 3:18:40
#163 ]
Elite Member
Joined: 14-Mar-2007
Posts: 2217
From: Kansas

cdimauro Quote:

Why is it needed? What issue could happen if you don't empty the pipeline from the code that you've generated?

To me it looks like that DSB should be enough: data need to be synchronized.

ISB, on the other hand, looks redundant.


The NOP instruction may be used for the 68020 external coprocessor interface which was eliminated with the 68040+ where NOP is likely unnecessary for synchronization but may have other uses. It may be used for synchronization in hardware drivers.

MC68020 Microprocessors User's Manual Quote:

5.6 BUS SYNCHRONIZATION

The MC68020/EC020 overlaps instruction execution—that is, during bus activity for one instruction, instructions that do not use the external bus can be executed. Due to the independent operation of the on-chip cache relative to the operation of the bus controller, many subsequent instructions can be executed, resulting in seemingly nonsequential instruction execution. When this is not desired and the system depends on sequential execution following bus activity, the NOP instruction can be used. The NOP instruction forces instruction and bus synchronization by freezing instruction execution until all pending bus cycles have completed.

An example of the use of the NOP instruction for this purpose is the case of a write operation of control information to an external register in which the external hardware attempts to control program execution based on the data that is written with the conditional assertion of BERR. Since the MC68020/EC020 cannot process the bus error until the end of the bus cycle, the external hardware has not successfully interrupted program execution. To prevent a subsequent instruction from executing until the external cycle completes, the NOP instruction can be inserted after the instruction causing the write. In this case, bus error exception processing proceeds immediately after the write and before subsequent instructions are executed. This is an irregular situation, and the use of the NOP instruction for this purpose is not required by most systems.

...

8.1.4 Instruction Execution Overlap

Overlap is the time, measured in clocks, when two instructions execute concurrently. In Figure 8-1, instructions A and B execute concurrently, and the overlapped portion of instruction B is absorbed in the instruction execution time of A (the previous instruction). The overlap time is deducted from the execution time of instruction B. Similarly, there is an overlap period between instruction B and instruction C, which reduces the attributed execution time for C.

The execution time attributed to instructions A, B, and C (after considering the overlap) is depicted in Figure 8-2.

It is possible that the execution time of an instruction will be absorbed by the overlap with a previous instruction for a net execution time of zero clocks.

Because of this overlap, a NOP is required between a write to a peripheral to clear an interrupt request and a subsequent MOVE to SR instruction to lower the interrupt mask level. Otherwise, the MOVE to SR instruction may complete before the write is accomplished, and a new interrupt exception will be generated for an old interrupt request.


If NOP was just for the outdated 68020 coprocessor interface, the 68040 and 68060 could have done away with the synchronization for the NOP instruction. Since they did not, I assume there are uses for a synchronization instruction that applies to pipelined CPUs with instruction execution overlap and parallel instruction execution. I believe this applies to JIT execution as well. It is likely that 99% of the time a NOP without an ISB would be fine but the same is likely true for a NOP without a DSB. What is expected from documentation and robust though?

Last edited by matthey on 03-Aug-2024 at 03:20 AM.

 Status: Offline
Profile     Report this post  
cdimauro 
Re: New Classic Amiga market?
Posted on 3-Aug-2024 14:55:46
#164 ]
Elite Member
Joined: 29-Oct-2012
Posts: 3957
From: Germany

@michalsc

Quote:

michalsc wrote:
@cdimauro

Quote:
Why is it needed? What issue could happen if you don't empty the pipeline from the code that you've generated?


That depends on how I will implement e.g. MMU. There, instruction barrier might be important, or not. It will be not important if I will issue ISB already in the translated code turning MMU on/off.

The good thing is that a JIT can have different code for different conditions (MMU on or off).


@matthey

Quote:

matthey wrote:
cdimauro Quote:

Why is it needed? What issue could happen if you don't empty the pipeline from the code that you've generated?

To me it looks like that DSB should be enough: data need to be synchronized.

ISB, on the other hand, looks redundant.


The NOP instruction may be used for the 68020 external coprocessor interface which was eliminated with the 68040+ where NOP is likely unnecessary for synchronization but may have other uses. It may be used for synchronization in hardware drivers.

MC68020 Microprocessors User's Manual Quote:

5.6 BUS SYNCHRONIZATION

The MC68020/EC020 overlaps instruction execution—that is, during bus activity for one instruction, instructions that do not use the external bus can be executed. Due to the independent operation of the on-chip cache relative to the operation of the bus controller, many subsequent instructions can be executed, resulting in seemingly nonsequential instruction execution. When this is not desired and the system depends on sequential execution following bus activity, the NOP instruction can be used. The NOP instruction forces instruction and bus synchronization by freezing instruction execution until all pending bus cycles have completed.

An example of the use of the NOP instruction for this purpose is the case of a write operation of control information to an external register in which the external hardware attempts to control program execution based on the data that is written with the conditional assertion of BERR. Since the MC68020/EC020 cannot process the bus error until the end of the bus cycle, the external hardware has not successfully interrupted program execution. To prevent a subsequent instruction from executing until the external cycle completes, the NOP instruction can be inserted after the instruction causing the write. In this case, bus error exception processing proceeds immediately after the write and before subsequent instructions are executed. This is an irregular situation, and the use of the NOP instruction for this purpose is not required by most systems.

...

8.1.4 Instruction Execution Overlap

Overlap is the time, measured in clocks, when two instructions execute concurrently. In Figure 8-1, instructions A and B execute concurrently, and the overlapped portion of instruction B is absorbed in the instruction execution time of A (the previous instruction). The overlap time is deducted from the execution time of instruction B. Similarly, there is an overlap period between instruction B and instruction C, which reduces the attributed execution time for C.

The execution time attributed to instructions A, B, and C (after considering the overlap) is depicted in Figure 8-2.

It is possible that the execution time of an instruction will be absorbed by the overlap with a previous instruction for a net execution time of zero clocks.

Because of this overlap, a NOP is required between a write to a peripheral to clear an interrupt request and a subsequent MOVE to SR instruction to lower the interrupt mask level. Otherwise, the MOVE to SR instruction may complete before the write is accomplished, and a new interrupt exception will be generated for an old interrupt request.


If NOP was just for the outdated 68020 coprocessor interface, the 68040 and 68060 could have done away with the synchronization for the NOP instruction. Since they did not, I assume there are uses for a synchronization instruction that applies to pipelined CPUs with instruction execution overlap and parallel instruction execution. I believe this applies to JIT execution as well. It is likely that 99% of the time a NOP without an ISB would be fine but the same is likely true for a NOP without a DSB. What is expected from documentation and robust though?

I think that the case of the MOVE to SR instruction which is reported on the above documentation makes sense and should be considered.

However, a JIT can produce different code according to the instructions flow. A NOP shouldn't always be translated to DSB + ISB if there's no subsequent MOVE to SR, for example.

 Status: Offline
Profile     Report this post  
Hammer 
Re: New Classic Amiga market?
Posted on 8-Aug-2024 3:59:58
#165 ]
Elite Member
Joined: 9-Mar-2003
Posts: 5846
From: Australia

@matthey

Quote:

Now lets consider the AC68080. I believe it has a 64 bit data bus making it a 64 bit CPU.

1. data bus width - AC68080 CPU is 64 bit, AC68080 ISA is undefined
2. max int datatype width - AC68080 CPU is 64 bit, AC68080 ISA is 64 bit
3. max pointer width - AC68080 CPU is 64 bit, AC68080 ISA is 64 bit (lacks 64 bit addressing modes?)
4. register width - AC68080 CPU is 64 bit, AC68080 ISA is 64 bit
5. ALU width - AC68080 CPU is 64 bit, AC68080 ISA is undefined


P55 Pentium MMX has an external 64-bit bus and it's not considered to be a "64-bit" CPU. MMX supports 64-bit scalar integer datatype.

A mainstream "64-bit" CPU allows user applications to access beyond 4GB of RAM in a linear memory model which is backed by 64-bit GPRs and 64-bit general-purpose ALU.

K8 Athlon supports dual double-rate data 64-bit memory bus i.e. 128-bit bus, 128-bit FADD vector units, and is still considered a "64-bit" CPU.

AmigaOS is a limitation for 4GB and 8GB RAM equipped RPi 4B/CM4 PiStorm. There's no PAE support on AmigaOS.

IA-32 Windows 2003 Server allows the "32-bit' OS to access memory size beyond 4GB via a memory segmentation model. Under PAE with 16 GB RAM, each 32-bit user app can have its maximum memory allocation.

Last edited by Hammer on 08-Aug-2024 at 04:09 AM.
Last edited by Hammer on 08-Aug-2024 at 04:08 AM.

_________________
Amiga 1200 (rev 1D1, KS 3.2, PiStorm32/RPi CM4/Emu68)
Amiga 500 (rev 6A, ECS, KS 3.2, PiStorm/RPi 4B/Emu68)
Ryzen 9 7900X, DDR5-6000 64 GB RAM, GeForce RTX 4080 16 GB

 Status: Offline
Profile     Report this post  
Goto page ( Previous Page 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 )

[ home ][ about us ][ privacy ] [ forums ][ classifieds ] [ links ][ news archive ] [ link to us ][ user account ]
Copyright (C) 2000 - 2019 Amigaworld.net.
Amigaworld.net was originally founded by David Doyle