2. Softcores API

2.1. PicoRV32

class softcores.picorv32.PicoRV32(output_dir='.', **kwargs)

PicoRV32 soft-core with instruction and data memory.

Variables
  • output_dir (str) – Directory to save the generated PicoSoC top module.

  • top_module (str) – Top module name instance.

  • top_tmpl_file (str) – Top module template file.

  • top_target_file (str) – Top module generated file.

  • source_dir (str) – Third party source files.

Parameters
  • output_dir (str) – Directory to save the PicoSoC top module (default: .).

  • memory_size (int, optional) – specify the cache memory size in Bytes (default: 1024).

  • enable_fast_mul (int, optional) – enable the fast multiplier in the core (default: 0).

configure_rv32i()

Configure the PicoSoC with base integer instruction set.

configure_rv32im()

Configure the PicoSoC with multiplier/divider support.

configure_rv32imc()

Configure the PicoSoC with multiplier/divider and compressed instruction support.

class softcores.picorv32.PicosocParser(filename='picosoc.v', searchdir='run_dir/latest')

Define a report parser to catch the memory size post-simulation, looking inside the result directory run_dir/. This object inherits from the default BaseParser class, which provides basic method to set up the regex for parsing.

Parameters
  • filename (str) – Name of the file to parse (default: picosoc.v).

  • searchdir (str) – Base path to search the file (default: run_dir/latest).

parse()

Parse the top Verilog module file of the soft-core.