Skip to content

Block-based characterization tool for molecular FCN circuits

Notifications You must be signed in to change notification settings

vlsi-nanocomputing/BBchar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DOI

BBchar Code Documentation

Author: Giuliana Beretta

The provided code is a MATLAB program for characterizing and simulating the behavior of a molecular circuit layout using the BBchar software. The program applies to molecular Field-Coupled Nanocomputing (molFCN) circuits designed in MagCAD and is able to:

  • automatically generate input files for the simulation of the circuit in SCERPA;
  • automatically characterize the circuit in order to provide a look-up-table with the input/output description plus some additional informations regarding timing and area;
  • provide the output of a circuit in the library given a geneic combination of the inputs.

Below is the documentation for the launching script code.

Contents

The input script is organized into several sections, each addressing different aspects of the molFCN circuit simulation or characterization process. These sections include

Paths Definition

The launching script begins by defining various file paths for data storage and retrieval

  • myDataPath: The root path for data storage.
  • BBcharPath: Path for BBchar-related files.
  • BBcharCodePath: Path for BBchar code files.
  • thisPath: Current working directory.
  • scerpaPath: Path for SCERPA files.
  • libraryPath: Path for the library files.
  • outputPath: Path for storing simulation output.
  • file: Name of the MagCAD layout file.

Clock Signal Parameters

Define parameters related to the clock signal used in the simulation.

  • clock_low and clock_high: Low and high voltage levels for the clock signal.
  • clock_step: Number of steps in the clock signal.
  • pSwitch, pHold, pRelease, and pReset: Clock signal profiles for different phases.
  • pCycle: Combined clock signal for a full simulation cycle.

Driver Parameters

Defines parameters related to the drivers of the circuit. All the variables must be a field of the same matlab structure.

  • doubleMolDriver: Flag for using double-molecule driver.

  • Ninputs: Number of physical inputs. If a driver is repeated several times in the circuit (repeated input, constant input, bus layout, etc.), it still counts as 1.

  • driverNames: Names of the drivers as they are in the .qll layout file.

  • maxVoltage: Maximum voltage value in volts for the drivers.

  • driverModes: Values assumed by the drivers in the simulations, can be more than 1 value at a time. The possible values are:

    1. sweep: variation vector between '0' and '1' (voltage variation between -maxVoltage and maxVoltage)
    2. not_sweep: variation vector betwee '1' and '0' (voltage variation between maxVoltage and -maxVoltage)
    3. 0: constant value equal to logic '0'
    4. 1: constant value equal to logic '1'
  • sweepType: Type of sweep for driver simulation. It can be lin for linear variations or log for logarithmic variations.

  • NsweepSteps: Number of steps in the sweep.

  • cycleLength: Length of a complete clock cycle.

  • clockStep: Number of steps in the clock signal.

  • NclockRegions: Number of clock regions.

  • phasesRepetition: Number of times clock regions repeat.

Termination Settings

Defines parameters related to termination of the circuit. All the variables must be a field of the same matlab structure.

  • enableTermination: Flag for enabling termination addition.
  • customLength: Custom number of cells for termination.
  • busLayout: Flag for bus or single line layouts.

SCERPA Settings

Defines parameters related to the SCERPA simulation. Refer to the SCERPA documentation for details.

The program work only for layout generated with MagCAD, so the user must provide the qllFile and magcadImporter must be set to 1. Since the program used the AdditionalInformation.txt file generated by SCERPA, the algorithm settings must contain dumpVout. Plot settings are free.

Characterization Settings

Defines parameters related to the molecular circuit characterization. All the variables must be a field of the same matlab structure.

  • LibPath: Path for the library files.
  • LibDeviceName: Name of the library folder where the circuit characterization will be stored.
  • out_path: Path where the simulation results to be used for the characterization are stored.

Launch the BBchar Software

Launches the BBchar software with specified settings and parameters. The possible commands of the program are related to the following three functionalities:

  • SIMULATE: Launch a SCERPA simulation with the specified parameters
    • command 'simulate'
  • CHARACTERIZE: Starting from a previous SCERPA simulation, it characterize the device and store the library files where indicated.
    • command 'characterize'
  • LIBRARY EVALUATION: Provide the output of the specified device given the input combination.
    • command 'evaluate'

Depending on the function required, the program automatically

  1. Checks for debug mode and library mode
  2. Builds the driver and clock matrix.
  3. Adds termination if enabled.
  4. Executes BBchar software in the specified mode.

Notes

Some sections include comments with "TODO" indicating incomplete parts of the code that need to be filled in.

Example

The example below is the launching script for the simulation of a MUX21 circuit

launchscript.m

clear variables
close all

Paths definition

myDataPath = '~';
BBcharPath = fullfile(myDataPath,'BBchar');
BBcharCodePath = fullfile(BBcharPath,'Code');
thisPath = pwd;
scerpaPath = fullfile(myDataPath,'scerpa');
libraryPath = fullfile(BBcharPath, 'Lib');
outputPath = fullfile(BBcharPath,'Layouts','mux21');
file = 'mux21.qll';

Clock signal parameters