cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
mediatronix
Visitor
Visitor
9,703 Views
Registered: ‎06-26-2009

pBlazIDE, MEM, assembler

Jump to solution

To shorten a couple of threads, please have a look at:

     http://code.google.com/p/pblazasm/source/browse/#svn/trunk

 

This batch assembler translates KCPSMASM and pBlazASM syntax based .PSM files and has additional directives to initialize scratch pad. A merge utility is availabe to merge the code in a .MEM file to a template file as usual. The .MEM file can also be used with Data2MEM.

 

.EXE files are availabe for Windows, made with MinGW.

This is all open-source so if you want to use it with Linux please do so.

 

Regards,

Henk van Kampen

 

 

1 Solution

Accepted Solutions
vanmierlo
Mentor
Mentor
10,780 Views
Registered: ‎06-10-2008

In this light, I have constructed a modified picoBlaze core. It contains:

 

- a ROM_enable output to cut power consumption in half (see the blog by Ken Chapman),

- a new HALT instruction to reduce it even further,

- a 256 bytes scratchpad in the same block ram where the ROM resides allowing initialized ram,

- and external access to this block ram while in reset for updating code or scratchpad ram.

 

Now the question is, is it allowed to publish this modified kcpsm.vhd?

 

Maarten

View solution in original post

5 Replies
vanmierlo
Mentor
Mentor
10,781 Views
Registered: ‎06-10-2008

In this light, I have constructed a modified picoBlaze core. It contains:

 

- a ROM_enable output to cut power consumption in half (see the blog by Ken Chapman),

- a new HALT instruction to reduce it even further,

- a 256 bytes scratchpad in the same block ram where the ROM resides allowing initialized ram,

- and external access to this block ram while in reset for updating code or scratchpad ram.

 

Now the question is, is it allowed to publish this modified kcpsm.vhd?

 

Maarten

View solution in original post

vanmierlo
Mentor
Mentor
9,285 Views
Registered: ‎06-10-2008

Allthough I was recommended to only describe the modifications (which I will do too) I decided to publish the full code here anyway.

 

* I renamed address to address_rom for clarity

* enable_rom is only 1 when t_state is 1 or during reset. This cuts power consumption of the blockram in half. Reset is necessary because there is no previous t_state to get the instruction at address 000.

* write_ram aka memory_write is basically what used to be the old memory_enable, but now external.

* enable_ram aka memory_enable is constructed by rearranging the inputs for the old memory_type and memory_enable. It enables the ram during FETCH / STORE / XOR and keeps it disbaled otherwise saving power consumption.

* in_reset is a copy of internal_reset to indicate the picoblaze is not accessing the blockram.

* A new HALT instruction is implemented with opcode 0x3C003, which is a modified EINT / INTERRUPT ENABLE (0x3C001). It still enables the interrupt, but also stops t_state toggling. An interrupt or reset will wake up the picoblaze. If you wanted you could even use opcode 0x3C002 (HALT DISABLE) to disable the interrupt and still halt execution. An interrupt would still wake up the core but without jumping to the interrupt vector.

* The scratchpad in distributed ram is removed

* Also removed INIT and synthesis_on/off stuff to get rid of many warnings

 

Enjoy,

Maarten

vanmierlo
Mentor
Mentor
9,265 Views
Registered: ‎06-10-2008

And here is the template for pBlazAsm.

 

* template.vhd contains the picoblaze core and the blockram. The scratchpad is mapped in the blockram at 0x380/0x700. Be carefull not to overwrite the interrupt vector by accident.

* dma_req will reset the picoblaze core and acknowledge dma_ack when in reset. During reset you can access the blockram externally with dma_write, dma_addr, dma_indata, dma_outdata to read/write the code or scratchpad memory.

 

Maarten

0 Kudos
technicolor
Adventurer
Adventurer
9,251 Views
Registered: ‎06-03-2009

 


vanmierlo wrote:

And here is the template for pBlazAsm.

 

[removed...]

Maarten


 

Maarten,

 

Does this also means that pBlazeASM now also support to "VHDL statement" is I requested as feature in a previous post with the subject: "pBlazeASM feature request: support for "the VHDL statement""

 

See http://forums.xilinx.com/xlnx/board/message?board.id=PicoBlaze&thread.id=697

 

Rgds,

Technicolor

0 Kudos
mediatronix
Visitor
Visitor
9,248 Views
Registered: ‎06-26-2009

Hi:

 

The VHDL statement was introduced in pBlazIDE, since this is an integrated IDE. The function of the VHDL statement is now replaced by a separate program pBlazMRG. Using a batch script or better a makefile allows you to this all with more flexibility. You can also use Data2MEM of Xilinx.

 

regards,

Henk

0 Kudos