Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QUBO] Solution readout via spikeIO for multi-chip support #820

Merged
merged 4 commits into from
Jan 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 28 additions & 1 deletion src/lava/proc/receiver/process.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2022 Intel Corporation
# Copyright (C) 2022-2023 Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause
# See: https://spdx.org/licenses/

Expand Down Expand Up @@ -30,3 +30,30 @@ def __init__(self, *,
super().__init__(shape=shape, name=name, log_config=log_config)
self.a_in = InPort(shape=shape)
self.payload = Var(shape=shape, init=0)


class Receiver32Bit(AbstractProcess):
"""Process saving input messages as a payload variable. For up to 32bit
payload.

Parameters
----------
shape : tuple(int)
Shape of the population of process units.
name : str
Name of the Process. Default is 'Process_ID', where ID is an
integer value that is determined automatically.
log_config : LogConfig
Configuration options for logging.
"""

def __init__(self, *,
shape: ty.Tuple[int, ...] = (1,),
name: ty.Optional[str] = None,
log_config: ty.Optional[LogConfig] = None) -> None:
super().__init__(shape=shape, name=name, log_config=log_config)
self.a_in = InPort(shape=shape)

# Total payload = (payload_first_byte << 24) + payload_last_bytes
self.payload_last_bytes = Var(shape=shape, init=0)
self.payload_first_byte = Var(shape=shape, init=0)
Loading