Sign In

Don't have a Xilinx account yet?

  • Choose to receive important news and product information
  • Gain access to special content
  • Personalize your web experience on Xilinx.com

Create Account

Username

Password

Forgot your password?
XClose Panel
Xilinx Home
Reply
Visitor
dteuchert
Posts: 2
Registered: ‎06-12-2011
0
Accepted Solution

Adding KCPSM3 instruction code

With existing KCPSM3 assembler, is there a way to inject a 18 bit constant into the program memory?

Currently using KCPSM3.VHDL with KCPSM3.exe assembler of February, 4th 2010.

 

We want to implement and invoke new instructions. Do we have to make our own assembler?

 

As a supplement the proposal is appended.

 

 

Xilinx Employee
chapman
Posts: 411
Registered: ‎09-05-2007

Re: Adding KCPSM3 instruction code

[ Edited ]

The INST directive can be used to insert any 18-bit value in the program space and it is described in the 'read_me.txt' file provided in the KCPSM3 download (repeated below). Looking at your attachment then you will be pleased to know that KCPSM6 supports programs up to 4K instructions and that the following FAQ has already covered various ideas and schemes when using KCPSM3.

 

http://forums.xilinx.com/t5/PicoBlaze/PicoBlaze-FAQ-Programs-gt-1024-instructions/m-p/710

 

 

 

INST Directive

 

Version v1.20 of the assembler introduced a new 'INST' directive which allows the

definition of any instruction code in line with the existing instructions. The INST

directive has only one operand which must be a 5 digit hexadecimal value in the range

00000 to 3FFFF corresponding to the 18-bit instruction memory formed in a Block RAM.

 

Examples of valid syntax for INST directive

 

INST 3245C

INST 14FA2

inst 2abfe

 

This directive was added to enable data to be embedded within the program memory

space which can then be accessed via the second port of the dual port Block RAM.

The INST directives will normally be preceded by the ADDRESS directive to locate

such data at a predictable location within the memory space.

 

Obviously great care should be taken to ensure that data values are not encountered by

KCPSM3 during normal operation as the macro does not support illegal op-code trapping.

Ken Chapman
Principal Engineer, Xilinx UK
Visitor
dteuchert
Posts: 2
Registered: ‎06-12-2011
0

Re: Adding KCPSM3 instruction code

Thanks, the INST directive is exactly what i was looking for and it works in the KCPSM3.exe version we have.

Of course, it would still be preferable to have symbolic names for system calls that are either processor extensions or implemented with code in additional progam blocks.

Next i will try to implement a bank register. In the meantime i found another unused bit in the unconditional call instruction (instruction bit 13). So the bank selector will have three bits. I put it into the KCPSM3 interface and it's up to the application how much blocks get wired up.

Everything appears to work out nice and simple. Hope to return with result soon. 

Visitor
praveenk
Posts: 21
Registered: ‎03-19-2013
0

Re: Adding KCPSM3 instruction code

hi,i am trying to use the picoblaze implemented frequency counter using  KCPSM3...............its the same program given on xilinx frequence counter which is for Spartan 3E XC500E . but i am having a spartan 3 kit and i am trying to program it on spartan 3 ,i am getting some errors which i am unable to solve ...can some one help me with the errors............

 

the errors are:-

Pack:679 - Unable to obey design constraints (LOC=SLICE_X8Y29) which
   require the combination of the following symbols into a single SLICEM
   component:
       MUXCY symbol "processor/sel_shadow_muxcy" (Output Signal =
   processor/sel_carry<0>)
       MUXCY symbol "processor/zero_cymux" (Output Signal = processor/zero_carry)
   The carry muxes are not connected in the required manner.  Please correct the
   design constraints accordingly.

 

Visitor
praveenk
Posts: 21
Registered: ‎03-19-2013
0

Re: Adding KCPSM3 instruction code

Respected Sir/Madam,

I  apologise to all readers for adding the threads other than the existing issue. I suggest you ignore my previous message.

 

thanking you..