Crate memea

Source
Expand description

MemEA - Memory Peripheral Estimation and Analysis Library

MemEA is a Rust library for estimating the area and characteristics of memory peripheral components. It provides tools for parsing component databases, processing layout files (GDS/LEF), and generating detailed area reports for memory arrays and their supporting circuitry.

§Features

  • Component Database Management: Create and manage databases of memory cells, logic blocks, switches, and ADCs with their physical and electrical characteristics
  • Layout File Processing: Extract dimensions and enclosure data from GDS and LEF files
  • Configuration Management: Handle multiple memory configurations with YAML/JSON support
  • Area Estimation: Calculate detailed area breakdowns for memory peripherals
  • Multiple Export Formats: Output results in CSV, JSON, YAML, or human-readable tables

§Quick Start

use memea::{config, db, export};
use std::path::PathBuf;
use std::collections::HashMap;

// Load component database
let db_path = PathBuf::from("components.yaml");
let database = db::build_db(&db_path)?;

// Load configurations
let config_paths = vec![PathBuf::from("config.yaml")];
let configs = config::read_all(&config_paths);

// Process and export results
let reports = HashMap::new(); // populated with analysis results
let output_file = Some(PathBuf::from("results.csv"));
export::export(&reports, &output_file)?;

Modules§

  • Configuration management for MemEA memory peripheral estimation.
  • Database management for MemEA memory peripheral components.
  • Export functionality for MemEA analysis results.
  • GDS layout file processing for MemEA component enclosure calculation.
  • LEF file parsing and database creation for MemEA memory components.

Macros§

  • Internal macro for colored log message formatting.
  • Macro for creating formatted error literals with red background.
  • Macro for printing error messages in red without newline.
  • Macro for printing error messages in red with newline.
  • Macro for printing informational messages in green without newline.
  • Macro for printing informational messages in green with newline.
  • Macro for conditional verbose printing - only prints if verbose flag is true.
  • Macro for printing warning messages in yellow without newline.
  • Macro for printing warning messages in yellow with newline.

Structs§

  • File completion handler for interactive prompts.
  • Represents a numeric range with minimum and maximum values.

Enums§

  • Comprehensive error type for all MemEA operations.
  • Default response options for user queries.

Constants§

  • ASCII art logo for the MemEA application.
  • Current version of the MemEA library.

Functions§

  • Creates a formatted horizontal bar for terminal output.
  • get_scale 🔒
    Returns the scaling factor for a given technology node.
  • Parses a range from a string containing two comma or semicolon-separated values.
  • Parses a tuple of two floating-point values from a string.
  • Prompts the user for a yes/no response with optional default.
  • Calculates scaling factor between two technology nodes.

Type Aliases§

  • Floating-point type used throughout MemEA for measurements and calculations.
  • Type representing memory array dimensions as (rows, columns).