CDRIn采样率改为8x,允许参数化
This commit is contained in:
@@ -125,7 +125,7 @@ int main(int argc, char **argv, char **env) {
|
||||
|
||||
top->reset = 1;
|
||||
top->clock = 0;
|
||||
top->clk400 = 0;
|
||||
top->clk800 = 0;
|
||||
|
||||
while(!Verilated::gotFinish()) {
|
||||
|
||||
@@ -172,11 +172,11 @@ static void init_and_clock(){
|
||||
main_cycle ++;
|
||||
}
|
||||
|
||||
uint8_t phase = 4;
|
||||
if ( main_time % 10 == (0+phase) ) {
|
||||
top->clk400 = 1;
|
||||
} else if ( main_time % 10 == (5+phase) ) {
|
||||
top->clk400 = 0;
|
||||
uint8_t phase = 1;
|
||||
if ( main_time % 5 == (0+phase) ) {
|
||||
top->clk800 = 1;
|
||||
} else if ( main_time % 5 == (2+phase) ) {
|
||||
top->clk800 = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user