-
-
...pga4student.com
// FPGA projects, Verilog projects, VHDL projects
// How to write a verilog testbench for bidirectional/ inout port
module test_IO();
reg DS,OEN,IE,PE,I,din;
wire PAD;
reg wr;
wire C;
// inout port
assign PAD = wr==1 ? din:1'bz;
DIGITAL_IO dut(I,DS,OEN,PAD,C,PE,IE);
initi...
-
-
...ublic static String language;
public static boolean alwaysOnTop;
//Look And Feel
//"pgs" (default)
//"native"
//"metal"
public static String lookAndFeel;
//What to do if destination file already exists
// 0 -> ask use...
-
-
...port *
# configure args
tf.set_random_seed(SEED)
config = tf.ConfigProto()
config.gpu_options.allow_growth = True
sess = tf.Session(config=config)
K.set_session(sess)
K.set_learning_phase(1)
# data loading part
caseNo = 118
weight_4_mag = 100
weight_4_ang = 1#2*math.pi/360
psse_dat...
-
-
...tabase:", len(features_known_arr))# Dlib 检测器和预测器# The detector and predictor will be useddetector = dlib.get_frontal_face_detector()predictor = dlib.shape_predictor('data/data_dlib/shape_predictor_68_face_landmarks.dat')# 创建 cv2 摄像头对象# cv2.VideoCapture(0) to use the def...
-
-
...#include<conio.h>
#define max 100
using namespace std;
//Class Customer
class Customer
{
public:
char name[100];
char address[100];
char phone[12];
char from_date[20];
char to_date[20];
float payment_advance;
int booking_id;
};
class Room
{
public:
char type;
char stype;
...
-
-
...分代码:function [Z]= impmet( EdgesTotal,TrianglesTotal,... EdgeLength,K,... &nbs...
-
-
...小段代码:<?php
/*
|
| Here you may define all of your model factories. Model factories give
| you a convenient way to create models for testing and seeding your
| database. Just tell the factory how a default model should look.
|
*/
$factory->define(App\Models\User::class, functi...
-
-
...
// if sensor detects vehicles on farm road,
// turn highway to yellow -> green
else next_state =HGRE_FRED;
end
HYEL_FRED: begin// yellow on highway and red on farm way
light_highway = 3'b010;
light_farm = 3'b100;
RED_count_en=0;
YELLOW_count_...
-
-
...PGA Projects, Verilog projects, VHDL projects
-- VHDL code for PWM Generator
-- Two de-bounced push-buttons
-- One: increase duty cycle by 10%
-- Another: Decrease duty cycle by 10%
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
USE IEEE.STD_LOGIC_UNSIGNED.ALL;
entity PWM_Generator is
port (
...
-
-
...ab示例代码:k=1;
for i=512:-1:1 % image is written from the last row to the first row
for j=1:768
a(k)=b(i,j,1);
a(k+1)=b(i,j,2);
a(k+2)=b(i,j,3);
k=k+3;
end
end
fid = fopen('kodim24.hex', 'wt');
fprintf(fid, '%x\n', a);
disp('Text file write done');disp(' ');
fclose(fid);
% fpga4s...