Skip to content

Instantly share code, notes, and snippets.


Subha Sarkar inkwisit

View GitHub Profile
inkwisit / Clock.v
Last active Apr 4, 2018
First prototype of Wavengine using FPGA
View Clock.v
`timescale 1ns / 1ps
module clock(clk_in,rst,clk_out,clk_select_line);
input clk_in;
input [2:0]clk_select_line;
input rst;
output reg clk_out;
View addition.v
module fpr_add(A,B,C);
input [31:0]A;
input [31:0]B;
output [31:0]C;
reg diff_sign;
wire [8:0]AgB; // exponential for A greater than B
wire [8:0]BgA; // exponential for B greater than A
wire [7:0]exp_diff; // difference of the exponentials
View main.cpp
#include "stm32f10x.h"
void delay(uint32_t);
int main()
//Enabling the peripheral for the GPIOC in RCC sector
//the led is connected to PC13 in Mini dev board.
inkwisit / DDS.v
Last active Jun 20, 2017
Cordic Algorithm for Quadrature Carrier Synthesis (Non-pipelined)
View DDS.v
`timescale 1ns / 1ps
module DDS(
input mainClock,
output [9:0]cosine,
output [9:0]sine,
output reg [2:0]stateMachineCounter,
output reg angleLatch,
output strobe
inkwisit / main.cpp
Last active Jun 18, 2017
View main.cpp
#include "stm32f10x.h"
//core peripherals of the CPU .. address taken from the data sheet
#define NVIC_ISER0 *((unsigned int*)0xE000E100)
int main()
//NVIC_InitTypeDef TIM2_INT;
//Reset and clock control : enabling the clock source for the timer2
inkwisit / practise.v
Created Jun 5, 2017
Parallel multiplier : demonstration of "parameter" key word and its advantages
View practise.v
module practise #(parameter width = 8)
input [width-1:0]multiplier,multiplicand,
output [2*width-1:0]product
assign product = multiplier*multiplicand;
inkwisit / harris_corner_detector.m
Created Jun 24, 2016
Computer vision basics (Harris Corner detector)
View harris_corner_detector.m
I = imread('check2.jpg');
%it is already in binary format
%I = rgb2gray(I);
I = I.*255;
%default values are 0,1 in binary so to show the image all 1's are
%multipled by 255
gaussian = fspecial('gaussian',3,1);
%derivative in x direction
dx = [1 0 -1;1 0 -1;1 0 -1];
%derivative in y direction
inkwisit / main.cpp
Created Jun 22, 2016
Lambertian model simulation using C++ (OPENCV3)
View main.cpp
//Author : Subha Sarkar
#define RADIUS 150
inkwisit / main.c
Created Jun 14, 2016
View main.c
#include "LPC17xx.h"
#include <stdint.h>
#include "uart2.h"
#include <stdlib.h>
int main()
char data;
char temp[15];
inkwisit / LPC17xx.h
Last active May 17, 2018
View LPC17xx.h
* @file LPC17xx.h
* @brief CMSIS Cortex-M3 Core Peripheral Access Layer Header File for
* NXP LPC17xx Device Series
* @version: V1.08
* @date: 21. December 2009
* @note
* Copyright (C) 2009 ARM Limited. All rights reserved.