06-12-2011 01:06 PM
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.
Solved! Go to Solution.
06-13-2011 03:27 AM - edited 06-13-2011 03:28 AM
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.
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
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.
Principal Engineer, Xilinx UK
06-13-2011 07:56 AM
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.
03-19-2013 04:18 AM
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
MUXCY symbol "processor/sel_shadow_muxcy" (Output Signal =
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.