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
module pmod_bldc( | |
// PMODSs | |
inout wire [7:0] io_pmod0, | |
inout wire [7:0] io_pmod1, | |
// Motor | |
input wire [2:0] i_motor_h, | |
input wire [2:0] i_motor_l, | |
input wire i_motor_en, | |
input wire i_motor_uev, | |
// Adc |
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
`define CLOCK_HZ 54_000_000 | |
module foo(input wire i_clk); | |
localparam PRESCALER = `CLOCK_HZ / 50; | |
reg [$clog2(PRESCALER)-1:0] counter; | |
always @(posedge i_clk) begin | |
// Comparison generates warning: | |
// Operator LT expects 32 or 26 bits on the LHS, but LHS's VARREF 'counter' generates 21 bits. |
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
`default_nettype none | |
`define CLK_HZ 25_000_000 | |
module top( | |
// 25MHz ref clock | |
input CLK_25M, | |
// Green indicator LED (open drain) | |
output DATA_LED, |
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
DP16KD #( | |
.DATA_WIDTH_A(9), | |
.DATA_WIDTH_B(9), | |
.CLKAMUX("CLKA"), | |
.CLKBMUX("CLKB"), | |
.WRITEMODE_A("NORMAL"), | |
.WRITEMODE_B("NORMAL"), | |
.GSR("AUTO"), | |
.REGMODE_A("OUTREG"), | |
.REGMODE_B("OUTREG") |
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
Info: Critical path report for clock '$glbnet$clk' (posedge -> posedge): | |
Info: curr total | |
Info: 5.8 5.8 Source pkt_data.data.0.0.0.DOB7 | |
Info: 1.1 6.9 Net eth_tx_data[7] budget 0.564000 ns (6,25) -> (5,27) | |
Info: Sink phy0.tx_crc_enable_TRELLIS_FF_Q_CE_L6MUX21_SD_D1_PFUMX_Z_SLICE.D1 | |
Info: 0.4 7.3 Source phy0.tx_crc_enable_TRELLIS_FF_Q_CE_L6MUX21_SD_D1_PFUMX_Z_SLICE.OFX0 | |
Info: 0.0 7.3 Net phy0.tx_crc_enable_TRELLIS_FF_Q_CE_L6MUX21_SD_D1 budget 0.000000 ns (5,27) -> (5,27) | |
Info: Sink phy0.tx_crc_enable_TRELLIS_FF_Q_CE_L6MUX21_SD_D1_PFUMX_Z_SLICE.FXB | |
Info: 0.2 7.5 Source phy0.tx_crc_enable_TRELLIS_FF_Q_CE_L6MUX21_SD_D1_PFUMX_Z_SLICE.OFX1 | |
Info: 0.6 8.1 Net phy0.tx_crc_enable_TRELLIS_FF_Q_CE_L6MUX21_SD_Z budget 0.281000 ns (5,27) -> (4,27) |
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
#!/usr/bin/env python3 | |
import sys | |
import csv | |
import itertools | |
import functools | |
from collections import defaultdict | |
def csv_to_rows(filename): | |
with open(filename) as csvfile: |
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
23> mbta:fetch_alerts_for_line("Red"). | |
[#alert{active_period = [#timerange{start = 1477947169, | |
'end' = 1477968592, | |
'$extensions' = {dict,0,16,16,8,80,48, | |
{[],[],[],[],[],[],[],[],[],...}, | |
{{[],[],[],[],[],[],[],...}}}}], | |
informed_entity = [#entityselector{agency_id = "1", | |
route_id = "Red",route_type = 1,trip = undefined, | |
stop_id = undefined, | |
'$extensions' = {dict,0,16,16,8,80,48, |
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
bytearrayobject.c: "bytearray_iterator", /* tp_name */ | |
descrobject.c: "dictproxy", /* tp_name */ | |
descrobject.c: "method-wrapper", /* tp_name */ | |
descrobject.c: "property", /* tp_name */ | |
dictobject.c: "dictionary-keyiterator", /* tp_name */ | |
dictobject.c: "dictionary-valueiterator", /* tp_name */ | |
dictobject.c: "dictionary-itemiterator", /* tp_name */ | |
dictobject.c: "dict_keys", /* tp_name */ | |
dictobject.c: "dict_items", /* tp_name */ | |
dictobject.c: "dict_values", /* tp_name */ |
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
/* Final fallback 3-way comparison, returning an int. Return: | |
-2 if an error occurred; | |
-1 if v < w; | |
0 if v == w; | |
1 if v > w. | |
*/ | |
static int | |
default_3way_compare(PyObject *v, PyObject *w) | |
{ | |
int c; |
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
protected <T> T getResponseDataItem(Class<T> classCast, String key, T defaultValue) { | |
if (responseData == null || !responseData.containsKey(key)) { | |
return defaultValue; | |
} | |
T value = defaultValue; | |
try { | |
value = (T) classCast.cast(responseData.get(key)); | |
} catch (ClassCastException ignored) { | |
} | |
return value; |
NewerOlder