This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Copyright (C) 2007, 2016 Sinby Corporation. All Rights Reserved. */ | |
#ifndef __LIB_TK_MUTEX_COND_H__ | |
#define __LIB_TK_MUTEX_COND_H__ | |
#include <assert.h> | |
#include <stdbool.h> | |
#include "kernel.h" | |
//------------------------------------------------------------------------ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
FORCE_MODE=0 | |
if [ "$1" = "-f" ]; then | |
FORCE_MODE=1 | |
shift | |
fi | |
if [ $# -eq 0 ]; then | |
echo Usage $0 '<video>.ts' | |
exit 1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from polyphony import testbench, module, is_worker_running | |
from polyphony.timing import clksleep, wait_rising, wait_value | |
from polyphony.io import Port, Queue | |
from polyphony.typing import bit, bit32 | |
@module | |
class fix_bounce_contact: | |
def __init__(self, wait_n, long_press_count_n): | |
self.wait_n = wait_n | |
self.long_press_count_n = long_press_count_n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from polyphony import testbench | |
from polyphony import rule | |
from polyphony import module | |
from polyphony.typing import bit, bit8, bit16 | |
from polyphony.io import Queue, Port | |
from polyphony import is_worker_running | |
from polyphony.timing import clksleep, wait_value, clkfence | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from polyphony import testbench, module, is_worker_running | |
from polyphony.io import Port | |
from polyphony.timing import wait_value | |
from polyphony.typing import bit | |
@module | |
class Blink: | |
def __init__(self, interval): | |
self.led = Port(bit, 'out') | |
self.interval = interval |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from polyphony import testbench, module, is_worker_running | |
from polyphony.io import Port | |
from polyphony.timing import wait_value | |
from polyphony.typing import bit | |
@module | |
class Blink: | |
def __init__(self, interval): | |
self.led = Port(bit, 'out') | |
self.interval = interval |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[derive(Debug, Copy, Clone)] | |
#[repr(packed)] | |
pub struct B { | |
pub flag1: bool, | |
pub flag2: bool, | |
pub flag3: bool, | |
pub flag4: bool, | |
pub flag5: bool, | |
pub flag6: bool, | |
pub flag7: bool, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from polyphony import testbench, module, is_worker_running | |
from polyphony import rule | |
_k = [0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, | |
0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, | |
0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, | |
0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, | |
0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, | |
0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, | |
0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import polyphony | |
from polyphony import testbench, module, is_worker_running | |
from polyphony.io import Port, Queue | |
from polyphony.typing import bit, uint8, uint3, uint4 | |
from polyphony.timing import clksleep, clkfence, wait_rising, wait_falling, wait_value | |
CONVST_PULSE_CYCLE = 10 | |
CONVERSION_CYCLE = 39 | |
@polyphony.module |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library ieee; | |
use ieee.std_logic_1164.all; | |
use ieee.numeric_std.all; | |
use iEEE.std_logic_arith.all; | |
use iEEE.std_logic_unsigned."+"; | |
use IEEE.std_logic_textio.all; | |
library std; | |
use std.textio.all; |