name: "Fixed-Weight Perceptron"
category: "AI/ML Accelerators"
complexity: "Easy"
description: >
  Implement a single perceptron (artificial neuron) for binary classification.
  
  The perceptron consists of:
  - 4 inputs (x0, x1, x2, x3), each an 8-bit unsigned integer.
  - 4 associated weights: w0=3, w1=-2, w2=4, w3=-1.
  - A bias term: b=-5.
  
  The neuron computes a weighted sum of its inputs and adds the bias.
  Then, it applies a step activation function: output 1 if the result is non-negative, otherwise 0.
  
  Outputs:
  - y: The binary classification result (1-bit).
  - z: The raw weighted sum before activation (12-bit signed).

interface:
  module_name: "perceptron"
  clocked: false
  ports:
    - name: "x0"
      type: "input"
      width: "8"
      description: "Input feature 0, unsigned 8-bit"
    - name: "x1"
      type: "input"
      width: "8"
      description: "Input feature 1, unsigned 8-bit"
    - name: "x2"
      type: "input"
      width: "8"
      description: "Input feature 2, unsigned 8-bit"
    - name: "x3"
      type: "input"
      width: "8"
      description: "Input feature 3, unsigned 8-bit"
    - name: "y"
      type: "output"
      width: "1"
      description: "Classification: 1 if weighted sum >= 0 else 0"
    - name: "z"
      type: "output"
      width: "12"
      description: "Weighted sum (signed 12-bit)"

target_platform:
  device_family: "AMD Xilinx Zynq-7000"

tasks:
  - name: "Area-Efficient Perceptron"
    constraints:
      max_lut: 30
      max_ff: 0
      max_bram: 0
      max_dsp: 0
      min_frequency: 200
    objective:
      goal: "minimise"
      target: "LUT"
