Skip to content

Instantly share code, notes, and snippets.

View mrjimenez's full-sized avatar
🎯
Focusing

Marcelo Roberto Jimenez mrjimenez

🎯
Focusing
View GitHub Profile
; XSVF Assembly language example file
;
; All XSVF instructions are used here
XSDRSIZE 48 ; XSDRSIZE must be set for the decoder/disassembler to work
; properly.
XTDOMASK ; Comment test
00 00 00 00 00 00
XSIR 8 00 ; Comment test
XSDR ; Comment test
$ ./xsvf -c disasm ../xsvf/XC2C64A/idcode.xsvf
07 00 XREPEAT 0
13 00 XENDIR RUN_TEST_IDLE
14 00 XENDDR RUN_TEST_IDLE
12 00 XSTATE TEST_LOGIC_RESET
12 01 XSTATE RUN_TEST_IDLE
02 08 01 XSIR 8 01
08 00 00 00 20 XSDRSIZE 32
01 0F FF 8F FF XTDOMASK
0F FF 8F FF
@mrjimenez
mrjimenez / id_code.svf
Created August 14, 2015 22:16
SVF file produced for checking the ID code of a Xilinx XC2C64A device
// Created using Xilinx Cse Software [ISE - 14.7]
// Date: Thu Jul 23 18:41:49 2015
TRST OFF;
ENDIR IDLE;
ENDDR IDLE;
STATE RESET;
STATE IDLE;
FREQUENCY 1E6 HZ;
//Operation: ReadIdcode -p 0
@mrjimenez
mrjimenez / wma-google-apps.js
Last active November 25, 2021 17:09
Weighted Moving Averages Using Google Apps Script
/**
* Performs an exponential moving average of the specified range,
* handling missing data in a way that does not distort the average.
*
* If the spcified window size is less than the range size, an array
* is returned, so there is no need to call this function serveral
* times in a row.
*
* @param alpha The geometric progression ratio.
* @param windowSize The size of the moving average window.